Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/src/RowScanner_PinsArray.h

27 lines
997 B
C
Raw Normal View History

#ifndef ROWSCANNER_PINSARRAY_H
#define ROWSCANNER_PINSARRAY_H
#include <Arduino.h>
#include <inttypes.h>
#include <config_keybrd.h>
#include <RowPort.h>
#include <ColPort.h>
2016-06-08 02:24:50 +00:00
/* RowScanner_PinsArray class uses Arduino pin numbers (not port pin numbers).
Constructor is in RowScanner_PinsArray.cpp
2016-06-08 02:24:50 +00:00
*/
class RowScanner_PinsArray
{
private:
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
public:
RowScanner_PinsArray(const uint8_t STROBE_PIN,
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);
};
#endif