keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Row_uC.cpp 580B

12345678910111213141516
  1. #include "Row_uC.h"
  2. /*
  3. process() scans the row and calls any newly pressed or released keys.
  4. */
  5. void Row_uC::process()
  6. {
  7. //these variables are all bitwise, one bit per key
  8. read_pins_t rowState; //1 means pressed, 0 means released
  9. read_pins_mask_t rowEnd; //1 bit marks positioned after last key of row
  10. read_pins_t debouncedChanged; //1 means debounced changed
  11. rowState = scanner.scan(rowEnd);
  12. debouncedChanged = debouncer.debounce(rowState, debounced);
  13. pressRelease(rowEnd, debouncedChanged);
  14. }