PCF8591 library
See https://developer.mbed.org/users/yasuyuki/notebook/PCF8591/
PCF8591.h
- Committer:
- yasuyuki
- Date:
- 2014-10-04
- Revision:
- 0:e17d7079ee96
File content as of revision 0:e17d7079ee96:
//********************** // PCF8591.h for mbed // // (C)Copyright 2014 All rights reserved by Y.Onodera // http://einstlab.web.fc2.com //********************** #ifndef PCF8591_H_ #define PCF8591_H_ #define PCF8591_ADDR 0x92 #include "mbed.h" class PCF8591{ public: PCF8591 (PinName sda, PinName scl); PCF8591 (I2C& p_i2c); void put(unsigned char a, unsigned char b); unsigned char get(unsigned char a); protected: I2C _i2c; char buf[2]; }; #endif /* PCF8591_H_ */