1
0
Fork 0

Update GPIO macro usages in core (#23093)

This commit is contained in:
Ryan 2024-02-18 17:08:27 +11:00 committed by GitHub
parent 6810aaf013
commit 2d1aed78a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 334 additions and 334 deletions

View file

@ -26,23 +26,23 @@ static const pin_t backlight_pin = BACKLIGHT_PIN;
static inline void backlight_on(pin_t backlight_pin) {
#if BACKLIGHT_ON_STATE == 0
writePinLow(backlight_pin);
gpio_write_pin_low(backlight_pin);
#else
writePinHigh(backlight_pin);
gpio_write_pin_high(backlight_pin);
#endif
}
static inline void backlight_off(pin_t backlight_pin) {
#if BACKLIGHT_ON_STATE == 0
writePinHigh(backlight_pin);
gpio_write_pin_high(backlight_pin);
#else
writePinLow(backlight_pin);
gpio_write_pin_low(backlight_pin);
#endif
}
void backlight_pins_init(void) {
// Setup backlight pin as output and output to off state.
FOR_EACH_LED(setPinOutput(backlight_pin); backlight_off(backlight_pin);)
FOR_EACH_LED(gpio_set_pin_output(backlight_pin); backlight_off(backlight_pin);)
}
void backlight_pins_on(void) {