FM
Dependencies: SimpleDMA eeprom mbed-rtos mbed FreescaleIAP
Fork of CDMS_CODE by
Diff: Flash.h
- Revision:
- 325:d375c11595be
- Parent:
- 324:c0a5228cc666
- Child:
- 326:e424f70b86c0
diff -r c0a5228cc666 -r d375c11595be Flash.h --- a/Flash.h Sat Dec 10 13:39:35 2016 +0000 +++ b/Flash.h Sat Dec 10 14:48:07 2016 +0000 @@ -93,4 +93,21 @@ { FCTN_CDMS_WR_FLASH(6,datablock & 0x00000001); } +} + +int verify_flash_sector(int mid,uint32_t* flasharray_thres) +{ + int add = strt_add_thres + ((mid-1)*SECTOR_SIZE); + int result = 0; + int* testfalsh = (int*)add; + for(int i=0;i<32;i++) + { + if(testflash[i] == flasharray_thres[i]) + continue; + else + { + return 1; + } + } + return 0; } \ No newline at end of file