aboutsummaryrefslogtreecommitdiff
path: root/keyboards/clueboard/66_hotswap
diff options
context:
space:
mode:
authorRyan <[email protected]>2024-05-02 19:48:49 +1000
committerGitHub <[email protected]>2024-05-02 10:48:49 +0100
commit61c7c1f74cc5365501a3038181df551df11f719e (patch)
tree67b134bfd3ba45660765f5c2c46b8d3f535b5b69 /keyboards/clueboard/66_hotswap
parent7220715dd1619dfb073db78cfc23998a67994655 (diff)
downloadqmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.tar.gz
qmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.zip
Convert some AVR GPIO operations to macros (#23424)
Diffstat (limited to 'keyboards/clueboard/66_hotswap')
-rw-r--r--keyboards/clueboard/66_hotswap/prototype/prototype.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/keyboards/clueboard/66_hotswap/prototype/prototype.c b/keyboards/clueboard/66_hotswap/prototype/prototype.c
index c89fbafbff..27aa332ca4 100644
--- a/keyboards/clueboard/66_hotswap/prototype/prototype.c
+++ b/keyboards/clueboard/66_hotswap/prototype/prototype.c
@@ -4,26 +4,26 @@
void backlight_init_ports(void) {
print("init_backlight_pin()\n");
// Set our LED pins as output
- DDRD |= (1<<0); // Esc
- DDRD |= (1<<4); // Page Up
- DDRD |= (1<<1); // Arrows
+ gpio_set_pin_output(D0); // Esc
+ gpio_set_pin_output(D4); // Page Up
+ gpio_set_pin_output(D1); // Arrows
// Set our LED pins low
- PORTD &= ~(1<<0); // Esc
- PORTD &= ~(1<<4); // Page Up
- PORTD &= ~(1<<1); // Arrows
+ gpio_write_pin_low(D0); // Esc
+ gpio_write_pin_low(D4); // Page Up
+ gpio_write_pin_low(D1); // Arrows
}
void backlight_set(uint8_t level) {
if ( level == 0 ) {
// Turn off light
- PORTD |= (1<<0); // Esc
- PORTD |= (1<<4); // Page Up
- PORTD |= (1<<1); // Arrows
+ gpio_write_pin_high(D0); // Esc
+ gpio_write_pin_high(D4); // Page Up
+ gpio_write_pin_high(D1); // Arrows
} else {
// Turn on light
- PORTD &= ~(1<<0); // Esc
- PORTD &= ~(1<<4); // Page Up
- PORTD &= ~(1<<1); // Arrows
+ gpio_write_pin_low(D0); // Esc
+ gpio_write_pin_low(D4); // Page Up
+ gpio_write_pin_low(D1); // Arrows
}
}