Project 1
4×4 Keypad
|
Neff Site |
This module implements an interface to the MIKROE-1294 8x8 Y Click. More...
Go to the source code of this file.
Macros | |
#define | C1889_COLS 4 |
#define | C1889_ROWS 4 |
Functions | |
uint16_t | c1889_scan (void) |
Scan keypad. More... | |
void | c1889_init (void) |
Initialize click module. More... | |
uint16_t | c1889_pressed (uint16_t current, uint16_t previous) |
Return pressed keys. More... | |
uint16_t | c1889_released (uint16_t current, uint16_t previous) |
Return released keys. More... | |
char | c1889_decode (uint8_t key) |
Decode key. More... | |
This module implements an interface to the MIKROE-1294 8x8 Y Click.
The MIKROE-1294 8x8 Y Click implements a 8x8 dot-matrix using a MAX7219 serially interfaced 8-Digit LED display driver. This module provides an interface to this module.
#define C1889_COLS 4 |
#define C1889_ROWS 4 |
char c1889_decode | ( | uint8_t | key | ) |
Decode key.
Decodes a key and returns the corresponding ASCII code.
key | The key to decode. |
void c1889_init | ( | void | ) |
Initialize click module.
Initializes the click module by setting up the SPI module.
uint16_t c1889_pressed | ( | uint16_t | current, |
uint16_t | previous | ||
) |
Return pressed keys.
Returns the keys that have been pressed since the last scan. This is done by analyzing the current and the previous state.
current | Current scan code of the keypad. |
previous | Previous scan code of the keypad. |
uint16_t c1889_released | ( | uint16_t | current, |
uint16_t | previous | ||
) |
Return released keys.
Returns the keys that have been released since the last scan. This is done by analyzing the current and the previous state.
current | Current scan code of the keypad. |
previous | Previous scan code of the keypad. |
uint16_t c1889_scan | ( | void | ) |
Scan keypad.
Scans the keypad and returns a scan code. Each key position is encoded by a bit. If a key is pressed the corresponding is set.
Contact | Generated by 1.8.13 |