nrf5: Updating example in main.c on how to execute string before REPL is set up, to allow for boards with two leds. Todo for later is to update this code such that it will skip this LED toggle when there are no leds defined. Or use an example not depending on LEDs.

This commit is contained in:
Glenn Ruben Bakke 2017-04-29 19:50:50 +02:00
parent 976785e1d5
commit 7aa7bad78a
1 changed files with 4 additions and 1 deletions

View File

@ -178,8 +178,11 @@ pin_init0();
do_str("import pyb\r\n" \
"pyb.LED(1).on()",
MP_PARSE_FILE_INPUT);
#elif (MICROPY_HW_LED_COUNT == 2)
do_str("import pyb\r\n" \
"pyb.LED(1).on()",
MP_PARSE_FILE_INPUT);
#else
do_str("import pyb\r\n" \
"pyb.LED(1).on()\r\n" \
"pyb.LED(3).on()",