1
0
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:
Koen Zandberg 2023-01-17 11:00:30 +01:00
parent d6f44f6206
commit b5af66cdd8
No known key found for this signature in database
GPG Key ID: BA1718B37D79F51C

View File

@ -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);