Loading...
Searching...
No Matches
matrix_keypad_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Koen Zandberg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef MATRIX_KEYPAD_PARAMS_H
20#define MATRIX_KEYPAD_PARAMS_H
21
22#include "board.h"
23#include "matrix_keypad.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
37#ifndef MATRIX_KEYPAD_PARAM_ROWS
38#define MATRIX_KEYPAD_PARAM_ROWS { GPIO_PIN(0, 0), GPIO_PIN(0, 1) }
39#endif
40
44#ifndef MATRIX_KEYPAD_PARAM_COLUMNS
45#define MATRIX_KEYPAD_PARAM_COLUMNS { GPIO_PIN(0, 2), GPIO_PIN(0, 3) }
46#endif
47
51#ifndef MATRIX_KEYPAD_PARAM_ROW2COL_DELAY
52#define MATRIX_KEYPAD_PARAM_ROW2COL_DELAY 1
53#endif
54
58#ifndef MATRIX_KEYPAD_PARAMS
59#define MATRIX_KEYPAD_PARAMS { \
60 .rows = MATRIX_KEYPAD_PARAM_ROWS, \
61 .columns = MATRIX_KEYPAD_PARAM_COLUMNS, \
62 .row2col_delay = MATRIX_KEYPAD_PARAM_ROW2COL_DELAY, \
63}
64#endif
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* MATRIX_KEYPAD_PARAMS_H */
Interface definition for the matrix keypad.
#define MATRIX_KEYPAD_PARAMS
Default param configuration.
static const matrix_keypad_params_t matrix_keypad_params[]
Configuration struct.
Device initialization parameters.