From 7aa7bad78a37d30fa5294de2b83e933b745d6c1e Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 29 Apr 2017 19:50:50 +0200 Subject: [PATCH] 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. --- nrf5/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nrf5/main.c b/nrf5/main.c index c89afbb8e5..348f77fcac 100644 --- a/nrf5/main.c +++ b/nrf5/main.c @@ -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()",