![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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:
- 1:2f1e120d6f75
- Parent:
- 0:be957fac28c5
File content as of revision 1:2f1e120d6f75:
#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() { for(int8_t i=0;i<(20);i++)flasharray[i]=nativeflash[i]; return flasharray[i]; } /*End*/