reform

MNT Reform: Open Source Portable Computer
Log (Feed) | Files | Refs (Tags) | README

commit 3f4dafa224545c8c05de42f20cdecfd3de60dfb1
parent 8faecb27f62c3aadd2c8c46d01c21ae75ac78a8a
Author: mntmn <lukas@mntmn.com>
Date:   Thu, 14 Feb 2019 11:13:03 +0100

WIP keyboard2: adjust matrix for rev2

Diffstat:
Mreform-keyboard2-fw/Keyboard.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/reform-keyboard2-fw/Keyboard.c b/reform-keyboard2-fw/Keyboard.c @@ -92,16 +92,16 @@ void SetupHardware() // declare port pins as inputs (0) and outputs (1) DDRB = 0b01110000; - DDRD = 0b11010001; + DDRD = 0b11010011; DDRF = 0b10000000; DDRE = 0b00000000; DDRC = 0b00000000; // initial pin states PORTB = 0b10001111; - PORTD = 0b00101110; + PORTD = 0b00101100; PORTF = 0b01111111; - PORTC = 0b01000000; + PORTC = 0b11000000; // disable JTAG @@ -272,17 +272,17 @@ const uint8_t matrix[15*6] = { #else const uint8_t matrix[15*6] = { - KEY_ESCAPE, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_DELETE, 0, + KEY_ESCAPE, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_DELETE, KEY_GRAVE_ACCENT_AND_TILDE, KEY_GRAVE_ACCENT_AND_TILDE, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS_AND_UNDERSCORE, KEY_EQUAL_AND_PLUS, KEY_BACKSPACE, 0, KEY_TAB, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_OPENING_BRACKET_AND_OPENING_BRACE, KEY_CLOSING_BRACKET_AND_CLOSING_BRACE, KEY_BACKSLASH_AND_PIPE, 0, - HID_KEYBOARD_SC_LEFT_CONTROL, HID_KEYBOARD_SC_EXSEL, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON_AND_COLON, KEY_APOSTROPHE_AND_QUOTE, KEY_ENTER, 0, + HID_KEYBOARD_SC_LEFT_CONTROL, KEY_F13, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON_AND_COLON, KEY_APOSTROPHE_AND_QUOTE, KEY_ENTER, 0, - HID_KEYBOARD_SC_LEFT_SHIFT, HID_KEYBOARD_SC_LEFT_SHIFT, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN, HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN, KEY_SLASH_AND_QUESTION_MARK, HID_KEYBOARD_SC_UP_ARROW, HID_KEYBOARD_SC_RIGHT_SHIFT, 0, + HID_KEYBOARD_SC_LEFT_SHIFT, KEY_DELETE, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN, HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN, KEY_SLASH_AND_QUESTION_MARK, HID_KEYBOARD_SC_UP_ARROW, HID_KEYBOARD_SC_RIGHT_SHIFT, 0, - HID_KEYBOARD_SC_LEFT_GUI, HID_KEYBOARD_SC_LEFT_ALT, HID_KEYBOARD_SC_LEFT_CONTROL, KEY_SPACE, KEY_SPACE, KEY_SPACE, HID_KEYBOARD_SC_RIGHT_ALT, HID_KEYBOARD_SC_PAGE_UP, HID_KEYBOARD_SC_PAGE_DOWN, HID_KEYBOARD_SC_LEFT_ARROW, HID_KEYBOARD_SC_DOWN_ARROW, HID_KEYBOARD_SC_RIGHT_ARROW, 0,0,0 + HID_KEYBOARD_SC_EXSEL, HID_KEYBOARD_SC_LEFT_GUI, HID_KEYBOARD_SC_LEFT_CONTROL, KEY_SPACE, HID_KEYBOARD_SC_LEFT_ALT, HID_KEYBOARD_SC_RIGHT_ALT, KEY_SPACE, HID_KEYBOARD_SC_PAGE_UP, HID_KEYBOARD_SC_PAGE_DOWN, HID_KEYBOARD_SC_LEFT_ARROW, HID_KEYBOARD_SC_DOWN_ARROW, HID_KEYBOARD_SC_RIGHT_ARROW, 0,0,0 }; // f8 = sleep @@ -352,7 +352,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn case 0: pressed = !(PIND&(1<<5)); break; case 1: pressed = !(PIND&(1<<3)); break; case 2: pressed = !(PIND&(1<<2)); break; - case 3: pressed = !(PIND&(1<<1)); break; + case 3: pressed = !(PINC&(1<<7)); break; case 4: pressed = !(PINB&(1<<3)); break; case 5: pressed = !(PINB&(1<<2)); break; case 6: pressed = !(PINB&(1<<1)); break;