Skip to content

Commit

Permalink
Create PCA9536.h
Browse files Browse the repository at this point in the history
  • Loading branch information
chromhelm committed May 13, 2015
1 parent b96e8b9 commit ddf3e8b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions PCA9536/PCA9536.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef PCA9536_H
#define PCA9536_H

#include "Wire.h"

/* arduino class */
class PCA9536class {
public:
void begin();
uint8_t setPinsAsInput(uint8_t pins);
uint8_t getPinsAsInput();

uint8_t setPinsPolarity(uint8_t pins);
uint8_t getPinsPolarity();

//return -1 on error
uint8_t read();
uint8_t readBuffer();
uint8_t write(uint8_t data);
private:
uint8_t read(uint8_t addresse);
uint8_t write(uint8_t addresse, uint8_t data);
};

extern PCA9536class PCA9536;
#endif //PCA9536_H

0 comments on commit ddf3e8b

Please sign in to comment.