EEPROM 24LC01 libraly
Diff: EEPROM24LC01.h
- Revision:
- 0:9937013783de
diff -r 000000000000 -r 9937013783de EEPROM24LC01.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EEPROM24LC01.h Sat Jul 29 13:09:33 2017 +0000 @@ -0,0 +1,31 @@ +/* + *************************************************************************** + * File Name : EEPROM24LC01.h + * + * Revision : 1.0 + * Notes : + * Target Board : mbed LPC + * + * Revision History: + *************************************************************************** + */ + +#ifndef _EEPROM24LC01_H_ +#define _EEPROM24LC01_H_ + +#include "mbed.h" +#define I2C_ADDR_EEPROM24LC01 0x50 + +class EEPROM24LC01 +{ +private: + int _i2c_address; + I2C *_i2c; + +public: + EEPROM24LC01(I2C *i2c, const int address=I2C_ADDR_EEPROM24LC01 ); + int byte8_write( char *data ); + int readAll( char *data, int size ); +}; + +#endif /* _EEPROM24LC01_H_ */ \ No newline at end of file