Compare commits

...

2 Commits

2 changed files with 4 additions and 3 deletions

View File

@ -7,3 +7,5 @@ INCLUDEPATH += /usr/avr/include
SOURCES += \
main.c
DEFINES += __AVR_ATmega8__

View File

@ -12,7 +12,6 @@
#define DELAY_ROW_SWITCH() _delay_ms(1) //_delay_us(1)
#define BAUDRATE 9600
#define UBRR 51 // (F_CPU / BAUDRATE) / 32
/* Keycode from include/linux/input.h */
#define KEY_RESERVED 0
@ -259,8 +258,8 @@ int main()
MATRIX_Y1(PORT) &= ~MASK_Y1; /* Pull row low when selected */
MATRIX_Y2(PORT) &= ~MASK_Y2; /* Pull row low when selected */
UCSRB = (1 << TXEN);
UBRRH = (UBRR >> 8) & 0xFF;
UBRRL = UBRR & 0xFF;
UBRRH = ((((F_CPU / BAUDRATE) / 16) - 1) >> 8);
UBRRL = (((F_CPU / BAUDRATE) / 16) - 1);
fn_active = 0;