21 lines
436 B
C
21 lines
436 B
C
/**
|
||
* @file keypad.h
|
||
* @brief Simple interrupt-driven 4×4 keypad driver.
|
||
*/
|
||
|
||
#ifndef KEYPAD_H
|
||
#define KEYPAD_H
|
||
|
||
#include <stdint.h>
|
||
|
||
/** Signature of the callback invoked on a confirmed key press */
|
||
typedef void (*KeypadCallback_t)(char key);
|
||
|
||
/**
|
||
* @brief Initialize the keypad pins & interrupts.
|
||
* @param cb Function to call when a key is pressed.
|
||
*/
|
||
void initKeypadInterrupts(KeypadCallback_t cb);
|
||
|
||
#endif // KEYPAD_H
|