This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
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>
|
2016-09-23 07:13:12 +00:00
|
|
|
#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_*??
|
|
|
|
*/
|
2016-09-23 07:13:12 +00:00
|
|
|
class LED_IOE : public LED
|
2016-09-22 13:46:50 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-09-23 07:13:12 +00:00
|
|
|
PortInterface& refPort;
|
2016-09-22 13:46:50 +00:00
|
|
|
const uint8_t pin; //bit pattern, 1 is IOE pin to LED
|
|
|
|
|
|
|
|
public:
|
2016-09-23 07:13:12 +00:00
|
|
|
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
|