![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CDMS_CODE_samp_23SEP_DMA_flag
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE_samp_23SEP_DMA by
Diff: DefinitionsAndGlobals.h
- Revision:
- 207:28a07943dded
- Parent:
- 206:fba4aeebf004
--- a/DefinitionsAndGlobals.h Thu Jun 30 14:00:33 2016 +0000 +++ b/DefinitionsAndGlobals.h Sat Jul 02 10:48:30 2016 +0000 @@ -145,14 +145,7 @@ //RF RELAY #define RF_RELAY_CNTRL_TX PTA7 #define RF_RELAY_CNTRL_BCN PTA12 - -//CDMS HK - #define COMRX_ALIVE 0xFF; - #define COMRX_DEAD 0x00; - #define DEVICE_ENABLED 0x00; - #define DEVICE_POWERED 0x01; - #define DEVICE_OC_FAULT 0x02; - #define DEVICE_DISABLED 0x03; + // ****************GLOBAL VARIABLES****************** // DEBUG @@ -177,6 +170,9 @@ DigitalOut gCS_RTC(SPI_CS_RTC); Mutex SPI_mutex; +//I2C +Mutex BAE_I2C_mutex; + //RF Relay DigitalOut RF_SW_CNTRL_BCN(RF_RELAY_CNTRL_BCN); DigitalOut RF_SW_CNTRL_TX(RF_RELAY_CNTRL_TX); @@ -220,6 +216,7 @@ const uint8_t gCALL_SIGN_STRING[TM_SHORT_SIZE] = {0xE0, 0x00, 0x00, 0x00, 0x56, 0x55, 0x32, 0x4E, 0x43, 0x46, 0x00, 0xAC, 0x11}; // CDMS HK +uint8_t CDMS_STANDBY; uint8_t CDMS_HEALTH_DATA[128]; uint8_t CDMS_RAM[59]; uint16_t GPIO_STATUS; @@ -241,9 +238,32 @@ CDMS_HK_min_max min_max_data; bool firstCount=true; +//GPIO PINS +DigitalIn V_A_PGOOD (PIN88); +DigitalIn V_B_PGOOD_1 (PIN6); +DigitalIn V_B_PGOOD_2 (PIN7); +DigitalIn V_C_PGOOD (PIN54); +DigitalIn COMRX_OC_FAULT (PIN68); +DigitalIn COMTX_OC_FAULT (PIN69); +DigitalIn BAE_OC_FAULT (PIN92); +DigitalIn PL_GPIO_1_STATUS (PIN71); +DigitalIn PL_GPIO_2_STATUS (PIN81); +DigitalIn PL_GPIO_3_STATUS (PIN80); +DigitalIn PL_BEE_SW_OC_FAULT (PIN4); +DigitalIn PL_EPS_LATCH_SW_OC_FAULT (); +DigitalIn V_C_EN_STATUS (); +DigitalIn V_D_EN_STATUS (); + + +DigitalIn SD_OC_FAULT (PIN90); +DigitalOut SD_SW_EN_DS (PIN97); +DigitalOut BAE_SW_EN_DS (PIN47); +DigitalOut PL_SW_EN_DS (PIN73); + //SD HK uint32_t FSC_CURRENT[6]; uint32_t FSC_LAST[6]; +uint8_t SD_RD_ERROR; //Time's uint32_t TIME_LATEST_RTC; @@ -259,4 +279,22 @@ uint16_t CDMS_HK_MAIN_COUNTER; uint16_t COMRX_RESET_COUNTER; uint16_t PL_MAIN_COUNTER; -uint16_t PL_RCV_SC_DATA_COUNTER; \ No newline at end of file +uint16_t PL_RCV_SC_DATA_COUNTER; + +//CDMS RAM parameters +uint8_t PL_INIT_STATUS; +uint8_t PL_MAIN_STATUS; +uint8_t PL_LOW_POWER; +uint8_t PL_STATE; +uint8_t PL_RCV_SC_DATA_STATUS; +uint8_t COM_SESSION; +uint8_t COM_RX; +uint8_t RF_SW_STATUS; +uint8_t COM_TX; +uint8_t COM_TX_STATUS; +uint8_t COM_MNG_TMTC; +uint8_t CDMS_STANDBY_HK; +uint8_t CDMS_STANDBY_PL; +uint8_t CDMS_INIT_STATUS; +uint8_t CDMS_HK_STATUS; +uint8_t CDMS_RTC_BL; \ No newline at end of file