PuG
/
eepromlab
YEAH
Fork of Nucleo_eeprom by
Diff: main.cpp
- Revision:
- 0:8b5e53600ba0
- Child:
- 1:8b005d040c91
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Aug 25 11:59:57 2015 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "eeprom.h" + + +EEPROM memory(I2C_SDA,I2C_SCL,EEPROM_Address); + +int main() +{ + char value='A'; + char data[2]; + memory.write(1,value); + memory.write(2,'a'); + memory.read(1,data,2); + printf("read[1] = %c\n",data[0]); + printf("read[2] = %c\n",data[1]); + +} \ No newline at end of file