diff options
author | Ryan <[email protected]> | 2024-05-02 19:48:49 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-02 10:48:49 +0100 |
commit | 61c7c1f74cc5365501a3038181df551df11f719e (patch) | |
tree | 67b134bfd3ba45660765f5c2c46b8d3f535b5b69 /keyboards/org60 | |
parent | 7220715dd1619dfb073db78cfc23998a67994655 (diff) | |
download | qmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.tar.gz qmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.zip |
Convert some AVR GPIO operations to macros (#23424)
Diffstat (limited to 'keyboards/org60')
-rw-r--r-- | keyboards/org60/org60.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/keyboards/org60/org60.h b/keyboards/org60/org60.h index 49687c8716..1fa92dceb2 100644 --- a/keyboards/org60/org60.h +++ b/keyboards/org60/org60.h @@ -3,6 +3,9 @@ #include "quantum.h" #include "led.h" +#define ORG60_CAPS_LOCK_LED_PIN B2 +#define ORG60_BACKLIGHT_PIN F5 + /* Org60 LEDs * GPIO pads * 0 F7 not connected @@ -12,8 +15,18 @@ * B2 Capslock LED * B0 not connected */ -inline void org60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void org60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } +inline void org60_caps_led_on(void) { + gpio_set_pin_output(ORG60_CAPS_LOCK_LED_PIN); + gpio_write_pin_low(ORG60_CAPS_LOCK_LED_PIN); +} +inline void org60_bl_led_on(void) { + gpio_set_pin_output(ORG60_BACKLIGHT_PIN); + gpio_write_pin_low(ORG60_BACKLIGHT_PIN); +} -inline void org60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void org60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } +inline void org60_caps_led_off(void) { + gpio_set_pin_input(ORG60_CAPS_LOCK_LED_PIN); +} +inline void org60_bl_led_off(void) { + gpio_set_pin_input(ORG60_BACKLIGHT_PIN); +} |