mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
matrix_keypad: Fix memcpy bug in initialization
This commit is contained in:
parent
d6f44f6206
commit
b5af66cdd8
@ -91,7 +91,7 @@ int matrix_keypad_init(matrix_keypad_t *dev, const matrix_keypad_params_t *param
|
|||||||
(CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_BEGIN & CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_END) == 0,
|
(CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_BEGIN & CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_END) == 0,
|
||||||
"Debounce patterns must not overlap");
|
"Debounce patterns must not overlap");
|
||||||
memset(dev, 0, sizeof(matrix_keypad_t));
|
memset(dev, 0, sizeof(matrix_keypad_t));
|
||||||
memcpy(&dev->params, params, sizeof(matrix_keypad_params_t));
|
dev->params = params;
|
||||||
dev->callback = callback;
|
dev->callback = callback;
|
||||||
dev->arg = arg;
|
dev->arg = arg;
|
||||||
_setup_columns(dev);
|
_setup_columns(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user