2016-06-09 19:29:31 +00:00
|
|
|
#ifndef ROWSCANNER_PINSARRAY_H
|
|
|
|
#define ROWSCANNER_PINSARRAY_H
|
2016-06-06 20:23:40 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include <inttypes.h>
|
2016-06-22 02:40:35 +00:00
|
|
|
#include <config_keybrd.h>
|
2016-06-06 20:23:40 +00:00
|
|
|
#include <RowPort.h>
|
|
|
|
#include <ColPort.h>
|
2016-06-08 02:24:50 +00:00
|
|
|
|
2016-06-18 22:32:21 +00:00
|
|
|
/* RowScanner_PinsArray class uses Arduino pin numbers (not port pin numbers).
|
2016-06-22 02:40:35 +00:00
|
|
|
Constructor is in RowScanner_PinsArray.cpp
|
2016-06-08 02:24:50 +00:00
|
|
|
*/
|
2016-07-07 21:31:34 +00:00
|
|
|
class RowScanner_PinsArray
|
2016-06-06 20:23:40 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-07-09 16:47:22 +00:00
|
|
|
static const bool STROBE_ON; //logic level of strobe on, HIGH or LOW
|
|
|
|
static const bool STROBE_OFF; //logic level of strobe off, HIGH or LOW
|
2016-07-02 21:10:02 +00:00
|
|
|
const uint8_t STROBE_PIN; //Arduino pin number connected to this row
|
|
|
|
const uint8_t* const READ_PINS; //array of read pin numbers
|
|
|
|
const uint8_t READ_PIN_COUNT; //number of read pins
|
2016-06-06 20:23:40 +00:00
|
|
|
public:
|
2016-06-30 10:40:39 +00:00
|
|
|
RowScanner_PinsArray(const uint8_t STROBE_PIN,
|
2016-07-09 09:59:28 +00:00
|
|
|
const uint8_t READ_PINS[], const uint8_t READ_PIN_COUNT); //todo rename READ_PIN_COUNT to KEY_COUNT ??
|
|
|
|
virtual read_pins_t scan(uint8_t& KEY_COUNT);
|
2016-06-06 20:23:40 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|