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

24 lines
818 B
C
Raw Normal View History

2016-07-12 13:23:24 +00:00
#ifndef SCANNER_UC_H
#define SCANNER_UC_H
2016-07-14 23:28:16 +00:00
#include <Arduino.h>
#include <inttypes.h>
#include <config_keybrd.h>
#include <ScannerInterface.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).
Limit number of readPins to size of read_pins_t, which is defined in config_keybrd.h
2016-06-08 02:24:50 +00:00
*/
class Scanner_uC : public ScannerInterface
{
private:
2016-11-06 09:41:56 +00:00
const bool activeState; //logic level of strobe on, HIGH or LOW
2016-07-15 05:15:38 +00:00
const uint8_t* const readPins; //array of read pin numbers
const uint8_t readPinCount; //number of readPins
public:
2016-11-06 09:41:56 +00:00
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