nRF51 SDK
|
Cherry8x16 Keyboard Application main file. More...
Macros | |
#define | USE_UART |
#define | SIMPLE_UART_TXD_PIN_NUMBER (24U) |
#define | SIMPLE_UART_RXD_PIN_NUMBER (25U) |
#define | KEYPAD_NUM_OF_COLUMNS 16 |
Number of columns in the keyboard matrix. | |
#define | KEYPAD_NUM_OF_ROWS 8 |
Number of rows in the keyboard matrix. | |
Functions | |
static void | uart_puthidstring (const char *str) |
Function for sending a series of characters (string) to UART. Execution is blocked until UART peripheral reports a character has been sent. More... | |
int | main (void) |
Function for application main entry. More... | |
Variables | |
static const uint8_t volatile *const | matrix_row_port = ((uint8_t*)(&NRF_GPIO->IN)) + 2 |
static uint16_t *const | matrix_column_port = ((uint16_t*)(&NRF_GPIO->OUT)) |
static const uint8_t | usb_hid2_ascii_look_up [KEYPAD_NUM_OF_COLUMNS *KEYPAD_NUM_OF_ROWS] |
This file contains the source code for an application using the Cherry8x16 Keyboard.
#define SIMPLE_UART_TXD_PIN_NUMBER (24U) |
Pin number to use as UART TXD. LEDs for modifier key presses and UART cannot be used at the same time as both use SIMPLE_UART_TXD_PIN_NUMBER. Comment out UART code if using LEDs for modifier keys (and comment out the LED code if using UART).
#define SIMPLE_UART_RXD_PIN_NUMBER (25U) |
Pin number to use as UART RXD. LEDs for modifier key presses and UART cannot be used at the same time as both use SIMPLE_UART_RXD_PIN_NUMBER. Comment out UART code if using LEDs for modifier keys (and comment out the LED code if using UART).
|
static |
[in] | str | Null terminated array of characters to send. |
int main | ( | void | ) |
|
static |
Pointer to GPIO memory used as a row port. No pointer alignment required for pointing to 8-bit values in this memory region.
|
static |
Pointer to GPIO memory used as a column port. Half-word alignment is required for pointing to 16-bit values in this memory region.
|
static |
Table containing the mapping between the USB HID codes and ASCII values for most of the keys.