|
42 | 42 |
|
43 | 43 | requiredboards = [ 'generic', 'esp8285' ] |
44 | 44 |
|
| 45 | +################################################################ |
45 | 46 | # serial upload speed order in menu |
46 | 47 | # default is 115 for every board unless specified with 'serial' in board |
47 | 48 | # or by user command line |
|
57 | 58 | ( '3000', [ 's3000','s57', 's115', 's230', 's256', 's460', 's512', 's921' ]), |
58 | 59 | ]) |
59 | 60 |
|
| 61 | +################################################################ |
60 | 62 | # boards list |
61 | 63 |
|
62 | 64 | boards = collections.OrderedDict([ |
|
467 | 469 | 'flashmode_dio', |
468 | 470 | 'flashfreq_40', |
469 | 471 | '4M', |
| 472 | + 'led216', |
470 | 473 | ], |
471 | 474 | 'desc': [ 'This module is sold under many names for around $6.50 on AliExpress and it\'s one of the cheapest, fully integrated ESP8266 solutions.', |
472 | 475 | '', |
@@ -1435,19 +1438,19 @@ def all_flash_map (): |
1435 | 1438 | ################################################################ |
1436 | 1439 | # builtin led |
1437 | 1440 |
|
1438 | | -def led (default,max): |
| 1441 | +def led (name, default, ledList): |
1439 | 1442 | led = collections.OrderedDict([ |
1440 | 1443 | ('.menu.led.' + str(default), str(default)), |
1441 | 1444 | ('.menu.led.' + str(default) + '.build.led', '-DLED_BUILTIN=' + str(default)), |
1442 | 1445 | ]); |
1443 | | - for i in range(0,max+1): # Make range incluside of max (16), since there are really 16 GPIOS not 15 |
| 1446 | + for i in ledList: # Make range incluside of max (16), since there are really 16 GPIOS not 15 |
1444 | 1447 | if not i == default: |
1445 | 1448 | led.update( |
1446 | 1449 | collections.OrderedDict([ |
1447 | 1450 | ('.menu.led.' + str(i), str(i)), |
1448 | 1451 | ('.menu.led.' + str(i) + '.build.led', '-DLED_BUILTIN=' + str(i)), |
1449 | 1452 | ])) |
1450 | | - return { 'led': led } |
| 1453 | + return { name: led } |
1451 | 1454 |
|
1452 | 1455 | ################################################################ |
1453 | 1456 | # sdk selection |
@@ -1495,7 +1498,8 @@ def all_boards (): |
1495 | 1498 |
|
1496 | 1499 | macros.update(all_flash_map()) |
1497 | 1500 | macros.update(all_debug()) |
1498 | | - macros.update(led(led_default, led_max)) |
| 1501 | + macros.update(led('led', led_default, range(0,led_max+1))) |
| 1502 | + macros.update(led('led216', 2, { 16 })) |
1499 | 1503 | macros.update(sdk()) |
1500 | 1504 |
|
1501 | 1505 | if boardfilteropt or excludeboards: |
|
0 commit comments