1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

board NodeMCUv1 menu: led selection (2, 16) (#6748)

This commit is contained in:
david gauchard 2019-11-10 22:07:51 +01:00 committed by GitHub
parent 4e5bf118c1
commit bc60e97489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -2610,6 +2610,10 @@ nodemcuv2.menu.eesz.4M.build.flash_ld=eagle.flash.4m.ld
nodemcuv2.menu.eesz.4M.build.spiffs_pagesize=256 nodemcuv2.menu.eesz.4M.build.spiffs_pagesize=256
nodemcuv2.menu.eesz.4M.upload.maximum_size=1044464 nodemcuv2.menu.eesz.4M.upload.maximum_size=1044464
nodemcuv2.menu.eesz.4M.build.rfcal_addr=0x3FC000 nodemcuv2.menu.eesz.4M.build.rfcal_addr=0x3FC000
nodemcuv2.menu.led.2=2
nodemcuv2.menu.led.2.build.led=-DLED_BUILTIN=2
nodemcuv2.menu.led.16=16
nodemcuv2.menu.led.16.build.led=-DLED_BUILTIN=16
nodemcuv2.menu.ip.lm2f=v2 Lower Memory nodemcuv2.menu.ip.lm2f=v2 Lower Memory
nodemcuv2.menu.ip.lm2f.build.lwip_include=lwip2/include nodemcuv2.menu.ip.lm2f.build.lwip_include=lwip2/include
nodemcuv2.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat nodemcuv2.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat

View File

@ -42,6 +42,7 @@ import json
requiredboards = [ 'generic', 'esp8285' ] requiredboards = [ 'generic', 'esp8285' ]
################################################################
# serial upload speed order in menu # serial upload speed order in menu
# default is 115 for every board unless specified with 'serial' in board # default is 115 for every board unless specified with 'serial' in board
# or by user command line # or by user command line
@ -57,6 +58,7 @@ speeds = collections.OrderedDict([
( '3000', [ 's3000','s57', 's115', 's230', 's256', 's460', 's512', 's921' ]), ( '3000', [ 's3000','s57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
]) ])
################################################################
# boards list # boards list
boards = collections.OrderedDict([ boards = collections.OrderedDict([
@ -467,6 +469,7 @@ boards = collections.OrderedDict([
'flashmode_dio', 'flashmode_dio',
'flashfreq_40', 'flashfreq_40',
'4M', '4M',
'led216',
], ],
'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.', '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.',
'', '',
@ -1435,19 +1438,19 @@ def all_flash_map ():
################################################################ ################################################################
# builtin led # builtin led
def led (default,max): def led (name, default, ledList):
led = collections.OrderedDict([ led = collections.OrderedDict([
('.menu.led.' + str(default), str(default)), ('.menu.led.' + str(default), str(default)),
('.menu.led.' + str(default) + '.build.led', '-DLED_BUILTIN=' + str(default)), ('.menu.led.' + str(default) + '.build.led', '-DLED_BUILTIN=' + str(default)),
]); ]);
for i in range(0,max+1): # Make range incluside of max (16), since there are really 16 GPIOS not 15 for i in ledList: # Make range incluside of max (16), since there are really 16 GPIOS not 15
if not i == default: if not i == default:
led.update( led.update(
collections.OrderedDict([ collections.OrderedDict([
('.menu.led.' + str(i), str(i)), ('.menu.led.' + str(i), str(i)),
('.menu.led.' + str(i) + '.build.led', '-DLED_BUILTIN=' + str(i)), ('.menu.led.' + str(i) + '.build.led', '-DLED_BUILTIN=' + str(i)),
])) ]))
return { 'led': led } return { name: led }
################################################################ ################################################################
# sdk selection # sdk selection
@ -1495,7 +1498,8 @@ def all_boards ():
macros.update(all_flash_map()) macros.update(all_flash_map())
macros.update(all_debug()) macros.update(all_debug())
macros.update(led(led_default, led_max)) macros.update(led('led', led_default, range(0,led_max+1)))
macros.update(led('led216', 2, { 16 }))
macros.update(sdk()) macros.update(sdk())
if boardfilteropt or excludeboards: if boardfilteropt or excludeboards: