This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
2016-05-09 14:05:08 +00:00
|
|
|
#ifndef LED_PCA9655E_H
|
|
|
|
#define LED_PCA9655E_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <Wire.h>
|
|
|
|
#include <LED.h>
|
2016-07-14 04:16:18 +00:00
|
|
|
#include <PortWrite_PCA9655E.h>
|
2016-05-09 14:05:08 +00:00
|
|
|
|
|
|
|
/* A LED_PCA9655E object is an PCA9655E pin that is connected to an LED indicator light.
|
2016-07-14 04:16:18 +00:00
|
|
|
Input/Ouput Direction configuration are set to ouput in PortWrite_PCA9655E.begin() and PortRead_PCA9655E.begin().
|
2016-05-09 14:05:08 +00:00
|
|
|
*/
|
|
|
|
class LED_PCA9655E: public LED
|
|
|
|
{
|
|
|
|
private:
|
2016-07-14 04:16:18 +00:00
|
|
|
//PortIOE& port;
|
2016-07-13 23:40:24 +00:00
|
|
|
//const uint8_t outputByteCommand; //General Purpose Input/Ouput register address
|
2016-07-14 04:16:18 +00:00
|
|
|
PortWrite_PCA9655E& refPort;
|
2016-05-09 14:05:08 +00:00
|
|
|
const uint8_t pin; //bitwise pin to LED
|
|
|
|
|
|
|
|
public:
|
2016-07-14 04:16:18 +00:00
|
|
|
LED_PCA9655E(PortWrite_PCA9655E& refPort, const uint8_t pin)
|
2016-07-13 23:40:24 +00:00
|
|
|
: refPort(refPort), pin(pin) {}
|
2016-05-09 14:05:08 +00:00
|
|
|
|
|
|
|
virtual void on();
|
|
|
|
virtual void off();
|
|
|
|
};
|
|
|
|
#endif
|