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
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue