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

18 lines
521 B
C
Raw Normal View History

#ifndef PORTINTERFACE_H
#define PORTINTERFACE_H
2016-05-09 14:05:08 +00:00
#include <Arduino.h>
#include <inttypes.h>
/*
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 PortInterface
2016-05-09 14:05:08 +00:00
{
public:
2016-09-24 17:26:08 +00:00
virtual void beginProtocol()=0; //SPI bus or I2C bus
2016-09-24 14:56:02 +00:00
virtual void begin(const uint8_t strobeOn)=0; //configure GPIO pins
virtual void write(const uint8_t strobePin, const bool pinLogicLevel)=0;
virtual uint8_t read()=0;
2016-05-09 14:05:08 +00:00
};
#endif