ESR-2025/keypad.h

21 lines
436 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @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