From 30a29dcd0d064ab8403a9afb32c59800bb346840 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 23 Sep 2021 21:05:09 +0200 Subject: GPIO: Specify default LED ID --- include/arch/msp430fr5994lp/driver/gpio.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/arch/msp430fr5994lp/driver/gpio.h') diff --git a/include/arch/msp430fr5994lp/driver/gpio.h b/include/arch/msp430fr5994lp/driver/gpio.h index c3f1abf..d8048c0 100644 --- a/include/arch/msp430fr5994lp/driver/gpio.h +++ b/include/arch/msp430fr5994lp/driver/gpio.h @@ -63,21 +63,21 @@ class GPIO { P8REN = 0xff; 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 { P1OUT |= BIT1; } } - inline void led_off(unsigned char id) { + inline void led_off(unsigned char id = 0) { if (id == 0) { P1OUT &= ~BIT0; } else { P1OUT &= ~BIT1; } } - inline void led_toggle(unsigned char id) { + inline void led_toggle(unsigned char id = 0) { if (id == 0) { P1OUT ^= BIT0; } else { -- cgit v1.2.3