24LCXXX I2C eeprom library
Fork of _24LCXXX by
Diff: _24LCXXX.h
- Revision:
- 2:81497827f2ee
- Parent:
- 1:c2bb7538cb69
diff -r c2bb7538cb69 -r 81497827f2ee _24LCXXX.h --- a/_24LCXXX.h Mon Feb 23 02:47:46 2015 +0000 +++ b/_24LCXXX.h Thu Feb 26 07:41:08 2015 +0000 @@ -11,6 +11,7 @@ * Revision History: * When Who Description of change * ----------- ----------- ----------------------- + * 2015/02/26 Akafugu Fixing page write * 2012/12/06 Hiroshi M init ***************************************************************************** * @@ -71,19 +72,22 @@ class _24LCXXX { +public: + _24LCXXX(I2C *i2c, const int address=I2C_ADDR_24LCXXX ); + _24LCXXX(I2C *i2c, Serial *pc, const int address=I2C_ADDR_24LCXXX ); + int nbyte_read( int mem_addr, void *data, int size ); + int byte_write( int mem_addr, char data ); + int nbyte_write( int mem_addr, char *data, int size ); + int nbyte_set( int mem_addr, char data, int size ); + private: int _i2c_address; I2C *_i2c; Serial *_pc; bool _debug; -public: - _24LCXXX(I2C *i2c, const int address=I2C_ADDR_24LCXXX ); - _24LCXXX(I2C *i2c, Serial *pc, const int address=I2C_ADDR_24LCXXX ); - int byte_write( int mem_addr, char data ); - int nbyte_write( int mem_addr, void *data, int size ); - int page_write( int mem_addr, char *data ); - int nbyte_read( int mem_addr, void *data, int size ); + int page_block( int mem_addr, char *data, uint16_t length, bool incrBuffer ); + int page_write( int mem_addr, char *data, uint16_t length); }; -#endif /* __24LCXXX_H_ */ \ No newline at end of file +#endif /* __24LCXXX_H_ */