diff options
| author | Dave Hylands | 2014-03-14 00:51:26 -0700 |
|---|---|---|
| committer | Dave Hylands | 2014-03-14 09:48:49 -0700 |
| commit | 0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3 (patch) | |
| tree | 0d36bb17c7bbb00c14a61a072d667162d7c9ff8f /stmhal/led.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/led.c')
| -rw-r--r-- | stmhal/led.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stmhal/led.c b/stmhal/led.c index a643ce84f..677c151b3 100644 --- a/stmhal/led.c +++ b/stmhal/led.c @@ -29,7 +29,7 @@ void led_init(void) { /* Configure I/O speed, mode, output type and pull */ GPIO_InitStructure.Speed = GPIO_SPEED_LOW; - GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStructure.Mode = PYB_OTYPE; GPIO_InitStructure.Pull = GPIO_NOPULL; /* Turn off LEDs and initialize */ @@ -45,6 +45,7 @@ void led_state(pyb_led_t led, int state) { return; } const pin_obj_t *led_pin = gLed[led - 1]; +//printf("led_state(%d,%d)\n", led, state); if (state == 0) { // turn LED off PYB_LED_OFF(led_pin); @@ -72,7 +73,6 @@ void led_toggle(pyb_led_t led) { } } -#if 0 /******************************************************************************/ /* Micro Python bindings */ @@ -130,4 +130,3 @@ static mp_obj_t pyb_Led(mp_obj_t led_id) { } MP_DEFINE_CONST_FUN_OBJ_1(pyb_Led_obj, pyb_Led); -#endif |
