diff options
| author | Dave Hylands <dhylands@gmail.com> | 2014-03-14 00:51:26 -0700 |
|---|---|---|
| committer | Dave Hylands <dhylands@gmail.com> | 2014-03-14 09:48:49 -0700 |
| commit | 0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3 (patch) | |
| tree | 0d36bb17c7bbb00c14a61a072d667162d7c9ff8f /stmhal/main.c | |
| parent | 33bdd2119d9ca28404acc2b0891d5a74997a0d05 (diff) | |
stmhal - add led support. Add netduino_plus_2 support
Tweaked a couple of the USB files to compile if neither dev nor host was defined.
Tested on netduiono plus 2 and stm32f4discovery boards
Diffstat (limited to 'stmhal/main.c')
| -rw-r--r-- | stmhal/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 865b4fa59..3565b174b 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -21,7 +21,6 @@ #include "misc.h" #include "systick.h" #include "pendsv.h" -#include "led.h" #include "usart.h" #include "mpconfig.h" #include "qstr.h" @@ -38,6 +37,7 @@ #include "gccollect.h" #include "pyexec.h" #include "pybmodule.h" +#include "led.h" #include "usb.h" #if 0 #include "ff.h" @@ -274,7 +274,8 @@ int main(void) { #if 0 pyb_led_t led = 1; - while (1) { + for (int i = 0; i < 24; i++) { + //while (1) { led_state(led, 1); usart_tx_strn_cooked(pyb_usart_global_debug, "on\n", 3); HAL_Delay(100); @@ -290,7 +291,6 @@ int main(void) { led = (led % 4) + 1; } - __fatal_error("done"); #endif int first_soft_reset = true; @@ -473,7 +473,7 @@ soft_reset: #endif #endif -#ifdef USE_HOST_MODE +#if defined(USE_HOST_MODE) // USB host pyb_usb_host_init(); #elif defined(USE_DEVICE_MODE) |
