mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +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,
|
||||
"Debounce patterns must not overlap");
|
||||
memset(dev, 0, sizeof(matrix_keypad_t));
|
||||
memcpy(&dev->params, params, sizeof(matrix_keypad_params_t));
|
||||
dev->params = params;
|
||||
dev->callback = callback;
|
||||
dev->arg = arg;
|
||||
_setup_columns(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user