created separate function for hex to char
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of SS_SensePOC2P0_11Dec2017_USERPID by
eeprom_pgm.cpp
- Committer:
- nikitateggi
- Date:
- 2017-06-23
- Revision:
- 22:ffa88619551d
- Parent:
- 4:6bd81bb1790d
- Child:
- 24:d992ee8369f4
File content as of revision 22:ffa88619551d:
#include "mbed.h" #include "eeprom.h" #include "eeprom_pgm.h" #include <stdio.h> Serial ec(USBTX, USBRX); // tx, rx EEPROM rom(PTC11, PTC10, 0x00, EEPROM::T24C32); void eprom_write(uint32_t address, int32_t data) { rom.write(address ,data); // write data into the address } int eprom_read(uint32_t address) // readng the data from the specified address { int32_t rdata; // changed to int32_t rom.read(address, rdata); ec.printf("Read back value=%d\n", rdata); return rdata; }