We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1968165 commit d0aa6fcCopy full SHA for d0aa6fc
drivers/kscan/kscan_mchp_xec.c
@@ -157,7 +157,7 @@ static bool check_key_events(void *dev)
157
bool key_pressed = false;
158
u32_t cycles_now = k_cycle_get_32();
159
160
- if (++kbd_data.scan_cycles_idx > SCAN_OCURRENCES)
+ if (++kbd_data.scan_cycles_idx >= SCAN_OCURRENCES)
161
kbd_data.scan_cycles_idx = 0U;
162
163
kbd_data.scan_clk_cycle[kbd_data.scan_cycles_idx] = cycles_now;
0 commit comments