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
9#pragma once
10
20
21#include "board.h"
22#include "matrix_keypad.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32
36#ifndef MATRIX_KEYPAD_PARAM_ROWS
37#define MATRIX_KEYPAD_PARAM_ROWS { GPIO_PIN(0, 0), GPIO_PIN(0, 1) }
38#endif
39
43#ifndef MATRIX_KEYPAD_PARAM_COLUMNS
44#define MATRIX_KEYPAD_PARAM_COLUMNS { GPIO_PIN(0, 2), GPIO_PIN(0, 3) }
45#endif
46
50#ifndef MATRIX_KEYPAD_PARAM_ROW2COL_DELAY
51#define MATRIX_KEYPAD_PARAM_ROW2COL_DELAY 1
52#endif
53
57#ifndef MATRIX_KEYPAD_PARAMS
58#define MATRIX_KEYPAD_PARAMS { \
59 .rows = MATRIX_KEYPAD_PARAM_ROWS, \
60 .columns = MATRIX_KEYPAD_PARAM_COLUMNS, \
61 .row2col_delay = MATRIX_KEYPAD_PARAM_ROW2COL_DELAY, \
62}
63#endif
65
73
74#ifdef __cplusplus
75}
76#endif
77
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.