flash codes for reading or writing 20 bytes into the last sector of the flash area
Dependencies: FreescaleIAP mbed
Flash.cpp
- Committer:
- raizel_varun
- Date:
- 2016-03-03
- Revision:
- 0:be957fac28c5
- Child:
- 1:2f1e120d6f75
File content as of revision 0:be957fac28c5:
#include "mbed.h" #include "FreescaleIAP.h" #include "Flash.h" #include "all_funcs.h" /*Writing to the Flash*/ void FCTN_CDMS_WR_FLASH() { for(int8_t i=0;i<(20);i++)flasharray[i]=nativeflash[i]; flasharray[i]=block; erase_sector(strt_add); program_flash(strt_add, (char*)&flasharray,20); } /*End*/ /*Reading from Flash*/ uint32_t FCTN_CDMS_RD_FLASH(uint16_t i) { for(int8_t i=0;i<(20);i++)flasharray[i]=nativeflash[i]; return flasharray[i]; } /*End*/