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

25 lines
713 B
C
Raw Normal View History

2016-09-22 13:46:50 +00:00
#ifndef LED_IOE_H
#define LED_IOE_H
#include <Arduino.h>
#include <inttypes.h>
#include <Wire.h>
#include <LED.h>
#include <PortInterface.h>
2016-09-22 13:46:50 +00:00
/* A LED_IOE object is an I/O expander pin that is connected to an LED indicator light.
Input/Ouput Direction configuration are set to ouput in PortWrite_*.begin() and PortRead_*.begin(). todo PortRead_*??
*/
class LED_IOE : public LED
2016-09-22 13:46:50 +00:00
{
private:
PortInterface& refPort;
2016-09-22 13:46:50 +00:00
const uint8_t pin; //bit pattern, 1 is IOE pin to LED
public:
LED_IOE(PortInterface& refPort, const uint8_t pin)
2016-09-22 13:46:50 +00:00
: refPort(refPort), pin(pin) {}
virtual void on();
virtual void off();
};
#endif