-// TEMP INCLUDES
-#include "usb_keyboard_debug.h"
-#include <print.h>
-
-#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
-
-// Number of keys
-#define KEYBOARD_SIZE 63
-#define KEYPAD_SIZE 16
-
-
-// Debouncing Defines
-#define SAMPLE_THRESHOLD 110
-#define MAX_SAMPLES 127 // Max is 127, reaching 128 is very bad
-
-
-// Verified Keypress Defines
-#define USB_TRANSFER_DIVIDER 10 // 1024 == 1 Send of keypresses per second, 1 == 1 Send of keypresses per ~1 millisecond
-
-
-// Drive Pin Defines
-#define DRIVE_reg_1 PORTD
-#define DRIVE_reg_2 PORTD
-#define DRIVE_reg_3 PORTD
-#define DRIVE_reg_4 PORTD
-#define DRIVE_reg_5 PORTD
-#define DRIVE_reg_6 PORTD
-#define DRIVE_reg_7 PORTE
-#define DRIVE_reg_8 PORTE
-#define DRIVE_reg_9 PORTE
-#define DRIVE_reg_10 <blank>
-#define DRIVE_reg_11 <blank>
-#define DRIVE_reg_12 <blank>
-
-#define DRIVE_pin_1 2
-#define DRIVE_pin_2 3
-#define DRIVE_pin_3 4
-#define DRIVE_pin_4 5
-#define DRIVE_pin_5 6
-#define DRIVE_pin_6 7
-#define DRIVE_pin_7 0
-#define DRIVE_pin_8 1
-#define DRIVE_pin_9 6
-#define DRIVE_pin_10 <blank>
-#define DRIVE_pin_11 <blank>
-#define DRIVE_pin_12 <blank>
-
-// Detect Pin/Group Defines
-#define DETECT_group_1 1
-#define DETECT_group_2 2
-#define DETECT_group_3 3
-#define DETECT_group_4 4
-#define DETECT_group_5 5
-#define DETECT_group_6 6
-#define DETECT_group_7 7
-#define DETECT_group_8 8
-#define DETECT_group_9 9
-#define DETECT_group_10 <blank>
-#define DETECT_group_11 <blank>
-#define DETECT_group_12 <blank>
-
-#define DETECT_group_size_1 7
-#define DETECT_group_size_2 7
-#define DETECT_group_size_3 6
-#define DETECT_group_size_4 8
-#define DETECT_group_size_5 7
-#define DETECT_group_size_6 7
-#define DETECT_group_size_7 8
-#define DETECT_group_size_8 8
-#define DETECT_group_size_9 4
-#define DETECT_group_size_10 <blank>
-#define DETECT_group_size_11 <blank>
-#define DETECT_group_size_12 <blank>
-
-// Switch Codes
-#define DETECT_group_array_1 {55,22,6 ,40,43,27,11}
-#define DETECT_group_array_2 {56,23,7 ,41,58,26,10}
-#define DETECT_group_array_3 {57,24,8 ,42,25,9}
-#define DETECT_group_array_4 {54,21,5 ,39,44,28,12,59}
-#define DETECT_group_array_5 {53,20,4 ,38,45,29,13}
-#define DETECT_group_array_6 {52,19,3 ,37,46,30,14}
-#define DETECT_group_array_7 {51,18,2 ,36,61,31,15,63}
-#define DETECT_group_array_8 {50,17,1 ,35,47,32,16,62}
-#define DETECT_group_array_9 {48,49,33,34} // 49/60 are the same line
-#define DETECT_group_array_10 <blank>
-#define DETECT_group_array_11 <blank>
-#define DETECT_group_array_12 <blank>
-
-
-
-// Drive Macros (Generally don't need to be changed), except for maybe DRIVE_DETECT
-// Sleep is for signal debouncing
-#define DRIVE_DETECT(reg,pin,group) \
- reg &= ~(1 << pin); \
- detection(group); \
- reg |= (1 << pin); \
- _delay_us(1);
-
-#define DD_CASE(number) \
- case number:\
- DRIVE_DETECT(DRIVE_reg_##number, DRIVE_pin_##number, DETECT_group_##number)
-
-#define DD_CASE_ORD(number) \
- DD_CASE(number) \
- break;