File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 7
7
#include <string.h>
8
8
9
9
#include "py/gc.h"
10
+ #include "py/mphal.h"
10
11
#include "py/runtime.h"
11
12
#include "shared-bindings/digitalio/DigitalInOut.h"
12
13
#include "shared-bindings/keypad/EventQueue.h"
@@ -133,6 +134,10 @@ static void keymatrix_scan_now(void *self_in, mp_obj_t timestamp) {
133
134
// to switch values. Just switching to an input with a (relatively weak) pullup/pulldown
134
135
// causes a slight delay in the output changing, which can cause false readings.
135
136
common_hal_digitalio_digitalinout_set_value (row_dio , self -> columns_to_anodes );
137
+
138
+ // Wait a moment to let the columns settle.
139
+ mp_hal_delay_us (1 );
140
+
136
141
// Switch the row back to an input, pulled appropriately
137
142
common_hal_digitalio_digitalinout_switch_to_input (
138
143
row_dio , self -> columns_to_anodes ? PULL_UP : PULL_DOWN );
You can’t perform that action at this time.
0 commit comments