Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos SimpleDMA FreescaleIAP eeprom
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: Flash.h
- Revision:
- 259:066a7abd2a5f
- Parent:
- 257:7d404e9dc9e2
- Child:
- 261:1e54415b34d3
--- a/Flash.h Tue Jul 12 17:07:17 2016 +0000
+++ b/Flash.h Tue Jul 12 17:30:04 2016 +0000
@@ -1,5 +1,6 @@
#include "FreescaleIAP.h"
+void FCTN_CDMS_WR_FLASH(uint16_t , uint32_t);
int strt_add = flash_size() - (2*SECTOR_SIZE);
uint32_t flasharray[32]; //256+(3*1024)
uint32_t INITIAL_FLASH[32];
@@ -25,23 +26,23 @@
{
read[j] = nativeflash[j];
}
- EPS_V_A_EN_STATUS = read[0] >> 31;
- BAE_SW_STATUS = (read[0] << 1) >> 30;
- CDMS_SD_SW_STATUS = (read[0] << 3) >> 30;
- PL_BEE_SW_STATUS = (read[0] << 5) >> 30;
- PL_EPS_LATCH_SW_EN = (read[0] << 7) >> 31;
- RTC_INIT_STATUS = (read[0] << 8) >> 30;
- CDMS_RTC_DISABLE = (read[0] << 10) >> 31;
- CDMS_RESET_COUNTER = read[0];
- TIME_LATEST_CDSMS_RESET = read[1];
- COM_TC_BYTES_LIMIT = read[2] >> 16;
- COM_RX_CURRENT_MAX = (read[2] << 16) >> 24;
- COM_RX_DISABLE_TIMEOUT = read[2];
- COM_PA_TMP_HIGH = read[3] >> 24;
- COM_PA_RECOVERY_TIMEOUT = (read[3] << 8) >> 24;
- COM_SESSION_TIMEOUT = (read[3] << 16) << 24;
- COM_RSSI_MIN = read[3];
- SD_LIB_BLK_CURRENT = read[4] >> 16;
+ EPS_V_A_EN_STATUS = read[0];
+ BAE_SW_STATUS = read[1];
+ CDMS_SD_SW_STATUS = read[2];
+ PL_BEE_SW_STATUS = read[3];
+ PL_EPS_LATCH_SW_EN = read[4];
+ RTC_INIT_STATUS = read[5];
+ CDMS_RTC_DISABLE = read[6];
+ CDMS_RESET_COUNTER = read[7];
+ TIME_LATEST_CDSMS_RESET = read[8];
+ COM_TC_BYTES_LIMIT = read[9];
+ COM_RX_CURRENT_MAX = read[10];
+ COM_RX_DISABLE_TIMEOUT = read[11];
+ COM_PA_TMP_HIGH = read[12];
+ COM_PA_RECOVERY_TIMEOUT = read[13];
+ COM_SESSION_TIMEOUT = read[14];
+ COM_RSSI_MIN = read[15];
+ SD_LIB_BLK_CURRENT = read[16];
}
}
@@ -60,24 +61,3 @@
/*End*/
/*===================================================MMS Functions=================================================*/
-
-void WRITE_TO_FLASH(uint8_t *);
-
-void WRITE_TO_FLASH(uint8_t *flash)
-{
- uint32_t FLASH[5];
- FLASH[0] = ((uint32_t)flash[0] << 24) | ((uint32_t)flash[1] << 16) | ((uint32_t)flash[2] << 8) | ((uint32_t)flash[3]);
- FLASH[1] = ((uint32_t)flash[4] << 24) | ((uint32_t)flash[5] << 16) | ((uint32_t)flash[6] << 8) | ((uint32_t)flash[7]);
- FLASH[2] = ((uint32_t)flash[8] << 24) | ((uint32_t)flash[9] << 16) | ((uint32_t)flash[10] << 8) | ((uint32_t)flash[11]);
- FLASH[3] = ((uint32_t)flash[12] << 24) | ((uint32_t)flash[13] << 16) | ((uint32_t)flash[14] << 8) | ((uint32_t)flash[15]);
- FLASH[4] = ((uint32_t)flash[16] << 24) | ((uint32_t)flash[17] << 16) | ((uint32_t)flash[18] << 8) | ((uint32_t)flash[19]);
- erase_sector(strt_add);
- program_flash(strt_add, (char*)FLASH,160);
-}
-
-void FCTN_CDMS_WR_S_FLASH(uint16_t , uint32_t);
-
-void FCTN_CDMS_WR_S_FLASH(uint16_t mid, uint32_t datavalue)
-{
-
-}
\ No newline at end of file
