Updating AVR abstraction to be compatible with ARM, nearly ready for ARM files
- Very small updates to files, mostly modifying to remove name duplications
This commit is contained in:
parent
a31f0e064a
commit
6da1558b78
29 changed files with 64 additions and 36 deletions
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// ----- Key Settings -----
|
||||
|
||||
#define KEYBOARD_SIZE 16 // # of keys
|
||||
#define KEYBOARD_KEYS 16 // # of keys
|
||||
#define MAX_ROW_SIZE 16 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 1 // # of keys in the largest column
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ ISR(USART1_RX_vect)
|
|||
inline void scan_setup()
|
||||
{
|
||||
// Setup the the USART interface for keyboard data input
|
||||
// NOTE: The input data signal needs to be inverted for the Teensy USART to properly work
|
||||
|
||||
// Setup baud rate
|
||||
// 16 MHz / ( 16 * Baud ) = UBRR
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x7F // 127 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// ----- Key Settings -----
|
||||
|
||||
#define KEYBOARD_SIZE 63 // # of keys
|
||||
#define KEYBOARD_KEYS 63 // # of keys
|
||||
#define MAX_ROW_SIZE 12 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 9 // # of keys in the largest column
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// ----- Key Settings -----
|
||||
|
||||
#define KEYBOARD_SIZE 90 // # of keys (It actually has 78, but there are markings up to 81 on the PCB and scan lines enough for 90
|
||||
#define KEYBOARD_KEYS 90 // # of keys (It actually has 78, but there are markings up to 81 on the PCB and scan lines enough for 90
|
||||
#define MAX_ROW_SIZE 6 // # of rows
|
||||
#define MAX_COL_SIZE 15 // # of columns
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x4c // 76 - Size of the array space for the keyboardr(max index)
|
||||
#define KEYBOARD_KEYS 0x4c // 76 - Size of the array space for the keyboardr(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x62 // 98 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x62 // 98 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// ----- Key Settings -----
|
||||
|
||||
#define KEYBOARD_SIZE 85 // # of keys (It actually has 66, but there are markings up to 80 on the PCB); 85 due to there being 5 "switch" keys, that have no numbers
|
||||
#define KEYBOARD_KEYS 85 // # of keys (It actually has 66, but there are markings up to 80 on the PCB); 85 due to there being 5 "switch" keys, that have no numbers
|
||||
#define MAX_ROW_SIZE 9 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 9 // # of keys in the largest column
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0xFF // 255 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0xFF // 255 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x5A // 90 - Size of the array space for the keyboardr(max index)
|
||||
#define KEYBOARD_KEYS 0x5A // 90 - Size of the array space for the keyboardr(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
// ----- Defines -----
|
||||
|
||||
#define KEYBOARD_SIZE 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_KEYS 0x68 // 104 - Size of the array space for the keyboard(max index)
|
||||
#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
// -- Example for scanCol --
|
||||
/*
|
||||
#define KEYBOARD_SIZE 16 // # of keys
|
||||
#define KEYBOARD_KEYS 16 // # of keys
|
||||
#define MAX_ROW_SIZE 16 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 1 // # of keys in the largest column
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
// -- Example for scanRow --
|
||||
/*
|
||||
#define KEYBOARD_SIZE 16 // # of keys
|
||||
#define KEYBOARD_KEYS 16 // # of keys
|
||||
#define MAX_ROW_SIZE 1 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 16 // # of keys in the largest column
|
||||
*/
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
// -- Example for scanRow_powrCol, scanCol_powrRow, and scanDual --
|
||||
/*
|
||||
#define KEYBOARD_SIZE 69 // # of keys
|
||||
#define KEYBOARD_KEYS 69 // # of keys
|
||||
#define MAX_ROW_SIZE 8 // # of keys in the largest row
|
||||
#define MAX_COL_SIZE 9 // # of keys in the largest column
|
||||
*/
|
||||
|
|
|
@ -67,7 +67,7 @@ uint8_t scan_count = 0;
|
|||
|
||||
// This is where the matrix scan data is held, as well as debouncing is evaluated to, which (depending on the read value) is handled
|
||||
// by the macro module
|
||||
uint8_t KeyIndex_Array[KEYBOARD_SIZE + 1];
|
||||
uint8_t KeyIndex_Array[KEYBOARD_KEYS + 1];
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
|
||||
// NOTE: Highest Bit: Valid keypress (0x80 is valid keypress)
|
||||
// Other Bits: Pressed state sample counter
|
||||
extern uint8_t KeyIndex_Array [KEYBOARD_SIZE + 1];
|
||||
static const uint8_t KeyIndex_Size = KEYBOARD_SIZE;
|
||||
extern uint8_t KeyIndex_Array [KEYBOARD_KEYS + 1];
|
||||
static const uint8_t KeyIndex_Size = KEYBOARD_KEYS;
|
||||
|
||||
extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
|
||||
extern volatile uint8_t KeyIndex_BufferUsed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue