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/Scanner_uC.h

27 lines
900 B
C
Raw Normal View History

2016-07-12 13:23:24 +00:00
#ifndef SCANNER_UC_H
#define SCANNER_UC_H
#include <Arduino.h>
#include <inttypes.h>
#include <config_keybrd.h>
2016-07-12 13:23:24 +00:00
#include <StrobePort.h>
#include <ReadPort.h>
2016-06-08 02:24:50 +00:00
2016-07-12 13:23:24 +00:00
/* Scanner_uC class uses Arduino pin numbers (not port pin numbers).
Constructor is in Scanner_uC.cpp
2016-06-08 02:24:50 +00:00
*/
2016-07-12 13:23:24 +00:00
class Scanner_uC
{
private:
static const bool STROBE_ON; //logic level of strobe on, HIGH or LOW
static const bool STROBE_OFF; //logic level of strobe off, complement of STROBE_ON
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:
2016-07-12 13:23:24 +00:00
Scanner_uC(const uint8_t STROBE_PIN,
const uint8_t READ_PINS[], const uint8_t READ_PIN_COUNT);
virtual read_pins_t scan();
};
#endif