From: tmk Date: Thu, 27 Jul 2017 12:43:14 +0000 (+0900) Subject: fc980c: Fix for pin config of TMK controller X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=3d3bcd8ad631ed6ee82a0929edca963ae240a184;p=max%2Ftmk_keyboard.git fc980c: Fix for pin config of TMK controller --- diff --git a/keyboard/fc980c/fc980c.c b/keyboard/fc980c/fc980c.c index f64ad807..31de53a1 100644 --- a/keyboard/fc980c/fc980c.c +++ b/keyboard/fc980c/fc980c.c @@ -51,11 +51,9 @@ void matrix_init(void) KEY_INIT(); - // LEDs on NumLock, CapsLock and ScrollLock(PD7, PB5, PB6) - DDRD |= (1<<7); - PORTD |= (1<<7); - DDRB |= (1<<5) | (1<<6); - PORTB |= (1<<5) | (1<<6); + // LEDs on NumLock, CapsLock and ScrollLock(PB4, PB5, PB6) + DDRB |= (1<<4) | (1<<5) | (1<<6); + PORTB |= (1<<4) | (1<<5) | (1<<6); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; @@ -133,9 +131,9 @@ matrix_row_t matrix_get_row(uint8_t row) void led_set(uint8_t usb_led) { if (usb_led & (1<> 2); // PB0 - PORTD = (PORTD & 0x9F) | ((ROW & 0x03) << 5); // PD5,6 + // PD4-6 + PORTD = (PORTD & 0x8F) | ((ROW & 0x07) << 4); } static inline void SET_COL(uint8_t COL) { - // PB4(Lo:Z5, Hi:Z4) - // PB1-3 - PORTB = (PORTB & 0xE1) | ((COL & 0x0F) << 1); + // PB0-3 + PORTB = (PORTB & 0xF0) | (COL & 0x0F); }