diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-09-23 21:05:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-09-23 21:05:09 +0200 |
commit | 30a29dcd0d064ab8403a9afb32c59800bb346840 (patch) | |
tree | 8e4d5c2c7d7575762a6af6833098a7f673ad1e0f /include/arch/msp430fr5969lp/driver/gpio.h | |
parent | 102e6f03e9d1ab9dc213b021b1dbe81d7fda332a (diff) |
GPIO: Specify default LED ID
Diffstat (limited to 'include/arch/msp430fr5969lp/driver/gpio.h')
-rw-r--r-- | include/arch/msp430fr5969lp/driver/gpio.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/arch/msp430fr5969lp/driver/gpio.h b/include/arch/msp430fr5969lp/driver/gpio.h index 0b8058b..7f2a3f7 100644 --- a/include/arch/msp430fr5969lp/driver/gpio.h +++ b/include/arch/msp430fr5969lp/driver/gpio.h @@ -47,21 +47,21 @@ class GPIO { P4REN = 0xff & ~BIT6; // red LED PJREN = BIT6 | BIT7; // HFXT (not populated) } - inline void led_on(unsigned char id) { + inline void led_on(unsigned char id = 0) { if (id == 0) { P1OUT |= BIT0; } else { P4OUT |= BIT6; } } - inline void led_off(unsigned char id) { + inline void led_off(unsigned char id = 0) { if (id == 0) { P1OUT &= ~BIT0; } else { P4OUT &= ~BIT6; } } - inline void led_toggle(unsigned char id) { + inline void led_toggle(unsigned char id = 0) { if (id == 0) { P1OUT ^= BIT0; } else { |