![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
vr1.1
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of CDMS_RTOS_v1_1 by
Flash.cpp@16:7428828a5da2, 2015-07-17 (annotated)
- Committer:
- cholletisaik777
- Date:
- Fri Jul 17 06:35:40 2015 +0000
- Revision:
- 16:7428828a5da2
- Parent:
- 11:d6dc9074075b
COM INTEGRATION
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pradeepvk2208 | 10:2c8b9ebc79e9 | 1 | #include "mbed.h" |
pradeepvk2208 | 10:2c8b9ebc79e9 | 2 | #include "FreescaleIAP.h" |
cholletisaik777 | 11:d6dc9074075b | 3 | #include "Flash.h" |
cholletisaik777 | 11:d6dc9074075b | 4 | #include "all_funcs.h" |
pradeepvk2208 | 10:2c8b9ebc79e9 | 5 | |
cholletisaik777 | 11:d6dc9074075b | 6 | /*Writing to the Flash*/ |
cholletisaik777 | 11:d6dc9074075b | 7 | void FCTN_CDMS_WR_FLASH(uint16_t i,uint32_t block) |
cholletisaik777 | 11:d6dc9074075b | 8 | { |
cholletisaik777 | 11:d6dc9074075b | 9 | for(int64_t i=0;i<(256+(3*1024));i++)flasharray[i]=nativeflash[i]; |
pradeepvk2208 | 10:2c8b9ebc79e9 | 10 | flasharray[i]=block; |
cholletisaik777 | 11:d6dc9074075b | 11 | erase_sector(strt_add); |
cholletisaik777 | 11:d6dc9074075b | 12 | program_flash(strt_add, (char*)&flasharray,4*(256+(1024*3))); |
pradeepvk2208 | 10:2c8b9ebc79e9 | 13 | } |
cholletisaik777 | 11:d6dc9074075b | 14 | /*End*/ |
pradeepvk2208 | 10:2c8b9ebc79e9 | 15 | |
cholletisaik777 | 11:d6dc9074075b | 16 | /*Reading from Flash*/ |
cholletisaik777 | 11:d6dc9074075b | 17 | uint32_t FCTN_CDMS_RD_FLASH(uint16_t i) |
cholletisaik777 | 11:d6dc9074075b | 18 | { |
cholletisaik777 | 11:d6dc9074075b | 19 | for(int64_t i=0;i<(256+(3*1024));i++)flasharray[i]=nativeflash[i]; |
pradeepvk2208 | 10:2c8b9ebc79e9 | 20 | return flasharray[i]; |
cholletisaik777 | 11:d6dc9074075b | 21 | } |
cholletisaik777 | 11:d6dc9074075b | 22 | /*End*/ |