No Matches
matrix_keypad.h File Reference

Interface definition for the matrix keypad. More...

Detailed Description

Interface definition for the matrix keypad.

Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net

Definition in file matrix_keypad.h.

#include <stdint.h>
#include <stdbool.h>
#include "periph/gpio.h"
+ Include dependency graph for matrix_keypad.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  matrix_keypad_params_t
 Device initialization parameters. More...
struct  matrix_keypad_t
 Device descriptor for the driver. More...


 Maximum number of rows.
 Maximum number of columns.
 Debounce pattern high to low bits.
 Debounce pattern low to high bits.
 Use open drain GPIO mode.
 GPIO mode used for the row GPIOs.
 Debounce pattern mask.


typedef uint8_t matrix_keypad_state_row_t
 Type definition for a full row (all columns) state, variable width depending on the number of columns.
typedef void(* matrix_keypad_cb_t) (void *arg, size_t row, size_t column, bool state)
 Callback for key state changes.


int matrix_keypad_init (matrix_keypad_t *dev, const matrix_keypad_params_t *params, matrix_keypad_cb_t callback, void *arg)
 Initialize the given device.
size_t matrix_keypad_scan (matrix_keypad_t *dev)
 Scan through the keypad matrix.