SX1509 16 Output I/O Expander / LED Driver Library
Diff: SX1509.h
- Revision:
- 1:9ab20d13c44e
- Parent:
- 0:893f387bda9f
- Child:
- 2:330355f546b0
--- a/SX1509.h Tue Oct 21 04:07:43 2014 +0000 +++ b/SX1509.h Tue Oct 21 06:33:14 2014 +0000 @@ -12,9 +12,6 @@ #define SX1509_ADDRESS_2 0x3F #define SX1509_ADDRESS_3 0x70 #define SX1509_ADDRESS_4 0x71 -//#define PARAM_WRITE 0x00 -#define DIR_ALL_OUTPUTS 0x00 - // DEFINES - Register Addresses // ==================================================== @@ -139,6 +136,9 @@ // ==================================================== #define BUFFER_SIZE (8) + +// ENUMERATIONS +// ==================================================== enum Direction_t { OUT = 0, IN @@ -185,20 +185,16 @@ // ==================================================== class SX1509 { - private: Direction_t dirA, dirB; char buf[BUFFER_SIZE]; - protected: DigitalIn *_intN; DigitalOut *_resetN; I2C *_i2c; - bool hasInt, hasReset; - void init(PinName, PinName, PinName, PinName); void direction(Direction_t, Side_t); int transfer_data(char const, char const, Transfer_t); @@ -232,5 +228,7 @@ void clearAll(Side_t); void enableLED(Side_t); void setupLED(LED_t); + }; + #endif \ No newline at end of file