Commit Graph

8 Commits

Author SHA1 Message Date
Jeff Epler d7c86c0e3e
refactor keypad to share more code
This saves 444 bytes on the pygamer build (both commits taken together)

testing performed:
 * pygamer (samd51) with ShiftRegisterKeys
 * macropad (rp2040) with Keys
 * UM feather s2 (esp32-s2) with KeyMatrix

Result:
 * all ports still worked nicely
 * keys held down at start always registered (>2 trials all boards, >100 trials esp32-s2)
 * keys held down are immediately registered after reset() (>100 trials esp32-s2)
 * double .reset() is OK, accessing .events throws (only tested esp32-s2)
2022-04-05 14:50:30 -05:00
Dan Halbert acf90fbb43 many renamings; add overflowed flag to EventQuque 2021-06-23 09:57:15 -04:00
Dan Halbert 51c547a5b9 add generic arg validation routines; add interval args to keypad 2021-06-21 12:13:39 -04:00
Dan Halbert 8cd7e774e7 add KeyMatrix columns_to_anodes arg 2021-06-18 12:03:47 -04:00
Dan Halbert cd31136c30 factor out keypad.EventQueue 2021-06-16 15:55:54 -04:00
Dan Halbert 3d18c5c327 Use a single list of keypad scanners 2021-06-16 13:29:38 -04:00
Dan Halbert 350652ee21 Keys works; more testing to do 2021-06-14 22:59:17 -04:00
Dan Halbert 32eec85230 compiles 2021-06-14 20:54:43 -04:00