aboutsummaryrefslogtreecommitdiff
path: root/stm/led.c
diff options
context:
space:
mode:
authorDamien George2014-02-23 00:31:11 +0000
committerDamien George2014-02-23 00:31:11 +0000
commit790eed6f93dc12df40715ad1062b5ce01badcbd9 (patch)
treee5016be46f1cc5cfa3be763f25a9ca2be03f1782 /stm/led.c
parentee462489f1da5ea332851843d10541594f6fc7b0 (diff)
stm: Make pendsv_nlr_jump work when debugging is enabled.
Stack layout is different when -g used, so need to handle the pendsv jump differently. Addresses Issue #315.
Diffstat (limited to 'stm/led.c')
-rw-r--r--stm/led.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stm/led.c b/stm/led.c
index 683e82bc6..0e02715f4 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -103,8 +103,8 @@ void led_toggle(pyb_led_t led) {
return;
}
- // XXX this assumes LED is driven by a low MCU output (true for PYBv3, false for PYBv4)
- if (!(port->ODR & pin)) {
+ // XXX this assumes LED is driven by a high MCU output (false for PYBv3, true for PYBv4)
+ if (port->ODR & pin) {
// turn LED off
PYB_LED_OFF(port, pin);
} else {