publishing to check changes in cdms code

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA_flag by samp Srinivasan

Committer:
ee12b079
Date:
Thu Jan 07 10:35:40 2016 +0000
Revision:
35:3beac900a034
Child:
208:d14b1c783736
Child:
214:6848a51af734
Child:
248:407ab7e337cd
Child:
255:642ea552ac77
Child:
257:7d404e9dc9e2
Relay_tmtc function, i2c.h, Flash.h, cdms_rtc.h added to the code, giving no errors. To be tested with CDMS TCs.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ee12b079 35:3beac900a034 1 #include "FreescaleIAP.h"
ee12b079 35:3beac900a034 2
ee12b079 35:3beac900a034 3 int strt_add = flash_size() - (4*SECTOR_SIZE);
ee12b079 35:3beac900a034 4 uint32_t flasharray[256+(3*1024)];
ee12b079 35:3beac900a034 5 char *nativeflash = (char*)strt_add;
ee12b079 35:3beac900a034 6
ee12b079 35:3beac900a034 7 /*Writing to the Flash*/
ee12b079 35:3beac900a034 8 void FCTN_CDMS_WR_FLASH(uint16_t j,uint32_t block)
ee12b079 35:3beac900a034 9 {
ee12b079 35:3beac900a034 10 for(int64_t i=0;i<(256+(3*1024));i++)
ee12b079 35:3beac900a034 11 {
ee12b079 35:3beac900a034 12 flasharray[i]=nativeflash[i];
ee12b079 35:3beac900a034 13 }
ee12b079 35:3beac900a034 14 flasharray[j]=block;
ee12b079 35:3beac900a034 15 erase_sector(strt_add);
ee12b079 35:3beac900a034 16 program_flash(strt_add, (char*)&flasharray,4*(256+(1024*3)));
ee12b079 35:3beac900a034 17 }
ee12b079 35:3beac900a034 18 /*End*/
ee12b079 35:3beac900a034 19
ee12b079 35:3beac900a034 20 /*Reading from Flash*/
ee12b079 35:3beac900a034 21 uint32_t FCTN_CDMS_RD_FLASH(uint16_t j)
ee12b079 35:3beac900a034 22 {
ee12b079 35:3beac900a034 23 for(int64_t i=0;i<(256+(3*1024));i++)
ee12b079 35:3beac900a034 24 {
ee12b079 35:3beac900a034 25 flasharray[i]=nativeflash[i];
ee12b079 35:3beac900a034 26 }
ee12b079 35:3beac900a034 27 return flasharray[j];
ee12b079 35:3beac900a034 28 }