Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b59fa2da
Commit
b59fa2da
authored
Jan 06, 2014
by
mux
Committed by
John R. Lenton
Jan 07, 2014
Browse files
Fix LED pin enum
* Fix LED pin enum, first one should start at 1 * Fix LED initialization typo
parent
e03c0533
Changes
2
Hide whitespace changes
Inline
Side-by-side
stm/led.c
View file @
b59fa2da
...
...
@@ -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_LED
1
_PIN
);
PYB_LED_OFF
(
PYB_LED4_PORT
,
PYB_LED
2
_PIN
);
PYB_LED_OFF
(
PYB_LED3_PORT
,
PYB_LED
3
_PIN
);
PYB_LED_OFF
(
PYB_LED4_PORT
,
PYB_LED
4
_PIN
);
/* Initialize LEDs */
GPIO_InitStructure
.
GPIO_Pin
=
PYB_LED1_PIN
;
...
...
stm/led.h
View file @
b59fa2da
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment