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

19 lines
488 B
C
Raw Normal View History

#ifndef PORTREAD_H
#define PORTREAD_H
2016-05-09 14:05:08 +00:00
#include <Arduino.h>
#include <inttypes.h>
/*
PortRead is an abstract base class.
2016-07-15 05:15:38 +00:00
Port classes are the keybrd library's interface to microcontroller ports or I/O expander ports.
2016-05-09 14:05:08 +00:00
*/
class PortRead
2016-05-09 14:05:08 +00:00
{
protected:
2016-07-15 05:15:38 +00:00
const uint8_t readPins; //bitwise pin configuration, 1 means read column
2016-05-09 14:05:08 +00:00
public:
2016-07-15 05:15:38 +00:00
PortRead(const uint8_t readPins): readPins(readPins) {}
virtual uint8_t read()=0;
2016-05-09 14:05:08 +00:00
};
#endif