Nucleo_eeprom

Dependencies:   eeprom mbed

Fork of Nucleo_eeprom by FRA221_2017

Revision:
9:70102b54bfcd
Parent:
8:1628d2c67f5e
Child:
10:374723606fc9
--- a/main.cpp	Tue Nov 06 04:14:12 2018 +0000
+++ b/main.cpp	Tue Nov 06 06:55:38 2018 +0000
@@ -14,9 +14,9 @@
     float   j = 9785.26844;    
 
     //// Write data to Address 1 and 2 
-    memory.write(1,(int8_t)data_dummy);
+    memory.write(0x0001,(int8_t)data_dummy);
     wait_ms(1);
-    memory.write(2,(int8_t)'c');
+    memory.write(0x0002,(int8_t)'c');
     wait_ms(1);
     
     /// Read data from address 1 to 4, and store in data array  
@@ -29,11 +29,11 @@
     printf("read[4] = %c\n",data[3]);
 
     //// Write float data 
-    memory.write(10,j);
+    memory.write(0x000A,j);
     wait_ms(1);
 
     //// Read float data, and store to x 
-    memory.read(10,x);
+    memory.read(0x000A,x);
     wait_ms(1);
     
     printf("float = %f\n",x);