-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |