1
0
Fork 0

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

@ -71,13 +71,12 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
DDRC &= ~(1<<7);
PORTC |= (1<<7);
DDRB &= ~(1<<7 | 1<<5);
PORTB |= (1<<7 | 1<<5);
DDRD &= ~(1<<6 | 1<<4 | 1<<1);
PORTD |= (1<<6 | 1<<4 | 1<<1);
gpio_set_pin_input_high(C7);
gpio_set_pin_input_high(B5);
gpio_set_pin_input_high(B7);
gpio_set_pin_input_high(D1);
gpio_set_pin_input_high(D4);
gpio_set_pin_input_high(D6);
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;