This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
2016-06-10 01:31:24 +00:00
|
|
|
#include "Row_IOE.h"
|
2016-06-02 15:58:33 +00:00
|
|
|
|
2016-06-05 22:16:47 +00:00
|
|
|
/*
|
|
|
|
process() scans the row and calls any newly pressed or released keys.
|
|
|
|
*/
|
2016-06-10 01:31:24 +00:00
|
|
|
void Row_IOE::process()
|
2016-06-05 22:16:47 +00:00
|
|
|
{
|
|
|
|
//these variables are all bitwise, one bit per key
|
|
|
|
uint8_t rowState; //1 means pressed, 0 means released
|
|
|
|
uint16_t rowEnd; //1 bit marks positioned after last key of row
|
|
|
|
uint8_t debouncedChanged; //1 means debounced changed
|
|
|
|
|
|
|
|
wait();
|
2016-06-06 06:52:14 +00:00
|
|
|
rowState = scanner.scan(rowEnd);
|
2016-06-05 22:33:13 +00:00
|
|
|
debouncedChanged = debouncer.debounce(rowState, debounced);
|
2016-06-05 22:16:47 +00:00
|
|
|
pressRelease(rowEnd, debouncedChanged);
|
|
|
|
}
|