input: kbd_matrix: add print helper define
Add a print helper define for the keyboard matrix row paired with the row typedef. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
85b398be65
commit
bc849c7078
|
@ -212,7 +212,7 @@ static bool input_kbd_matrix_check_key_events(const struct device *dev)
|
|||
key_pressed = input_kbd_matrix_scan(dev);
|
||||
|
||||
for (int c = 0; c < cfg->col_size; c++) {
|
||||
LOG_DBG("c=%2d u=%02x p=%02x n=%02x",
|
||||
LOG_DBG("c=%2d u=" PRIkbdrow " p=" PRIkbdrow " n=" PRIkbdrow,
|
||||
c,
|
||||
cfg->matrix_unstable_state[c],
|
||||
cfg->matrix_previous_state[c],
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
/** Row entry data type */
|
||||
#if CONFIG_INPUT_KBD_MATRIX_16_BIT_ROW
|
||||
typedef uint16_t kbd_row_t;
|
||||
#define PRIkbdrow "%04x"
|
||||
#else
|
||||
typedef uint8_t kbd_row_t;
|
||||
#define PRIkbdrow "%02x"
|
||||
#endif
|
||||
|
||||
/** Maximum number of rows */
|
||||
|
|
Loading…
Reference in a new issue