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
2016-11-06 02:41:56 -07:00

24 lines
818 B
C++

#ifndef SCANNER_UC_H
#define SCANNER_UC_H
#include <Arduino.h>
#include <inttypes.h>
#include <config_keybrd.h>
#include <ScannerInterface.h>
/* Scanner_uC class uses Arduino pin numbers (not port pin numbers).
Limit number of readPins to size of read_pins_t, which is defined in config_keybrd.h
*/
class Scanner_uC : public ScannerInterface
{
private:
const bool activeState; //logic level of strobe on, HIGH or LOW
const uint8_t* const readPins; //array of read pin numbers
const uint8_t readPinCount; //number of readPins
public:
Scanner_uC(const bool activeState, const uint8_t readPins[], const uint8_t readPinCount);
void init(const uint8_t strobePin);
virtual read_pins_t scan(const uint8_t strobePin);
};
#endif