Convert some AVR GPIO operations to macros (#23424)
This commit is contained in:
parent
7220715dd1
commit
61c7c1f74c
71 changed files with 877 additions and 840 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue