Convert some AVR GPIO operations to macros (#23424)

This commit is contained in:
Ryan 2024-05-02 19:48:49 +10:00 committed by GitHub
parent 7220715dd1
commit 61c7c1f74c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
71 changed files with 877 additions and 840 deletions

View file

@ -1,9 +1,12 @@
#include "the50.h"
#define THE50_LED_PIN B7
void the50_led_on(void) {
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
gpio_set_pin_output(THE50_LED_PIN);
gpio_write_pin_low(THE50_LED_PIN);
}
void the50_led_off(void) {
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
gpio_set_pin_input(THE50_LED_PIN);
}