Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Diff: FMS_all.h
- Revision:
- 343:cd7b1734f7a0
- Parent:
- 333:cddef120cae3
- Child:
- 345:cdde554477cd
diff -r d63eb331a67d -r cd7b1734f7a0 FMS_all.h --- a/FMS_all.h Mon Jan 02 14:21:44 2017 +0000 +++ b/FMS_all.h Wed Jan 04 10:55:22 2017 +0000 @@ -83,7 +83,8 @@ { SD_SW_EN_DS = 1; SD_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED); + WRITE_TO_EEPROM(2,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED); gPC.printf("sw on sd\n"); } @@ -91,7 +92,8 @@ { SD_SW_EN_DS = 0; SD_STATUS = DEVICE_DISABLED; - FCTN_CDMS_WR_FLASH(2,DEVICE_DISABLED); + WRITE_TO_EEPROM(2,(int32_t)DEVICE_DISABLED); + //FCTN_CDMS_WR_FLASH(2,DEVICE_DISABLED); gPC.printf("sw off sd\n"); } @@ -122,7 +124,8 @@ { BAE_SW_EN_DS = 1; BAE_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED); + WRITE_TO_EEPROM(1,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED); gPC.printf("sw on bae\n"); } @@ -130,7 +133,8 @@ { BAE_SW_EN_DS = 0; BAE_STATUS = DEVICE_DISABLED; - FCTN_CDMS_WR_FLASH(1,DEVICE_DISABLED); + WRITE_TO_EEPROM(1,(int32_t)DEVICE_DISABLED); + //FCTN_CDMS_WR_FLASH(1,DEVICE_DISABLED); gPC.printf("sw off bae\n"); } @@ -144,7 +148,8 @@ PYLD_DFF_CLK = 0; wait_us(1); PL_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED); + WRITE_TO_EEPROM(3,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED); } void SW_OFF_PL_BEE() @@ -157,7 +162,8 @@ PYLD_DFF_CLK = 0; wait_us(1); PL_STATUS = DEVICE_DISABLED; - FCTN_CDMS_WR_FLASH(3,DEVICE_DISABLED); + WRITE_TO_EEPROM(3,(int32_t)DEVICE_DISABLED); + //FCTN_CDMS_WR_FLASH(3,DEVICE_DISABLED); } void SW_ON_PL_EPS() @@ -170,7 +176,8 @@ PYLD_EPS_DFF_PWR_CLK = 0; wait_us(1); PL_EPS_LATCH_SW_EN = 1; - FCTN_CDMS_WR_FLASH(4,1); + WRITE_TO_EEPROM(4,(int32_t)1); + //FCTN_CDMS_WR_FLASH(4,1); } void SW_OFF_PL_EPS() @@ -183,21 +190,24 @@ PYLD_EPS_DFF_PWR_CLK = 0; wait_us(1); PL_EPS_LATCH_SW_EN = 0; - FCTN_CDMS_WR_FLASH(4,0); + WRITE_TO_EEPROM(4,(int32_t)0); + //FCTN_CDMS_WR_FLASH(4,0); } void SW_ON_V_A_EN() { V_A_EN = 1; EPS_V_A_EN_STATUS = 1; - FCTN_CDMS_WR_FLASH(0,1); + WRITE_TO_EEPROM(0,(int32_t)1); + //FCTN_CDMS_WR_FLASH(0,1); } void SW_OFF_V_A_EN() { V_A_EN = 0; EPS_V_A_EN_STATUS = 0; - FCTN_CDMS_WR_FLASH(0,0); + WRITE_TO_EEPROM(0,(int32_t)0); + //FCTN_CDMS_WR_FLASH(0,0); } void RST_SD() @@ -206,7 +216,8 @@ wait_ms(10); SD_SW_EN_DS = 1; SD_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED); + WRITE_TO_EEPROM(2,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED); gPC.printf("rst sd\n"); } @@ -217,7 +228,8 @@ BAE_SW_EN_DS = 1; wait_ms(100); BAE_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED); + WRITE_TO_EEPROM(1,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED); gPC.printf("rst bae\n"); } @@ -227,7 +239,8 @@ wait_ms(10); PYLD_DFF = 1; PL_STATUS = DEVICE_POWERED; - FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED); + WRITE_TO_EEPROM(3,(int32_t)DEVICE_POWERED); + //FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED); } void RST_BAE()