hardware/Atreus: Unroll the row initialization

Unroll the row initialization in `setup()`, saving quite a bit on code size.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/454/head
Gergely Nagy 6 years ago
parent 495ef43b13
commit 46b5193d8d
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -52,11 +52,9 @@ void Atreus::setup(void) {
wdt_disable();
delay(100);
for (uint8_t i = 0; i < ROWS; i++) {
DDRD |= _BV(row_pins[i]);
PORTD |= _BV(row_pins[i]);
keyState_[i] = previousKeyState_[i] = 0;
}
// Initialize rows
DDRD |= _BV(0) | _BV(1) | _BV(3) | _BV(2);
PORTD |= _BV(0) | _BV(1) | _BV(3) | _BV(2);
// Initialize columns
DDRB &= ~(_BV(5) | _BV(4) | _BV(6) | _BV(7));

Loading…
Cancel
Save