M24LC64 library
See https://developer.mbed.org/users/yasuyuki/notebook/24LC64/
Diff: M24LC64.h
- Revision:
- 0:4ab58ea5ecf6
diff -r 000000000000 -r 4ab58ea5ecf6 M24LC64.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/M24LC64.h Sat Oct 04 12:03:05 2014 +0000 @@ -0,0 +1,33 @@ +//********************** +// M24LC64.h for mbed +// +// (C)Copyright 2014 All rights reserved by Y.Onodera +// http://einstlab.web.fc2.com +//********************** + +#ifndef M24LC64_H_ +#define M24LC64_H_ + +#define M24LC64_ADDR 0xA0 + +#include "mbed.h" +#include "typedef.h" + +class M24LC64{ +public: + M24LC64 (PinName sda, PinName scl); + M24LC64 (I2C& p_i2c); + + void put(unsigned int a, unsigned char b); + unsigned char get(unsigned int a); + +protected: + I2C _i2c; + char buf[3]; + WORD_VAL adr; + +}; + + +#endif /* M24LC64_H_ */ +