summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormux <freelancer.c@gmail.com>2014-01-06 06:41:56 +0200
committermux <freelancer.c@gmail.com>2014-01-06 06:41:56 +0200
commit7c0c28dd71a66fc4028d86e5b34c85af5b32efb5 (patch)
treee65c85b7b296152d6426d62714c6e9f3bb2a3e44
parentb3683abaebbb14f392edbb0772f4a96ca3d40a60 (diff)
downloadmicropython-7c0c28dd71a66fc4028d86e5b34c85af5b32efb5.tar.gz
micropython-7c0c28dd71a66fc4028d86e5b34c85af5b32efb5.zip
Fix LED pin enum
* Fix LED pin enum, first one should start at 1 * Fix LED initialization typo
-rw-r--r--stm/led.c4
-rw-r--r--stm/led.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/stm/led.c b/stm/led.c
index 044a91f0c1..6139d6d6c9 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -63,8 +63,8 @@ void led_init(void) {
/* Turn off LEDs */
PYB_LED_OFF(PYB_LED1_PORT, PYB_LED1_PIN);
PYB_LED_OFF(PYB_LED2_PORT, PYB_LED2_PIN);
- PYB_LED_OFF(PYB_LED3_PORT, PYB_LED1_PIN);
- PYB_LED_OFF(PYB_LED4_PORT, PYB_LED2_PIN);
+ PYB_LED_OFF(PYB_LED3_PORT, PYB_LED3_PIN);
+ PYB_LED_OFF(PYB_LED4_PORT, PYB_LED4_PIN);
/* Initialize LEDs */
GPIO_InitStructure.GPIO_Pin = PYB_LED1_PIN;
diff --git a/stm/led.h b/stm/led.h
index fcbfa17634..c68f3e4142 100644
--- a/stm/led.h
+++ b/stm/led.h
@@ -1,13 +1,13 @@
typedef enum {
- PYB_LED_R1 = 0,
- PYB_LED_R2 = 1,
- PYB_LED_G1 = 2,
- PYB_LED_G2 = 3,
+ PYB_LED_R1 = 1,
+ PYB_LED_R2 = 2,
+ PYB_LED_G1 = 3,
+ PYB_LED_G2 = 4,
//STM32F4DISC
- PYB_LED_R = 0,
- PYB_LED_G = 1,
- PYB_LED_B = 2,
- PYB_LED_O = 3,
+ PYB_LED_R = 1,
+ PYB_LED_G = 2,
+ PYB_LED_B = 3,
+ PYB_LED_O = 4,
} pyb_led_t;
void led_init(void);