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: FreescaleIAP mbed-rtos mbed
Fork of workinQM_5thJan_azad by
Diff: main.cpp
- Revision:
- 40:c2538d97e78b
- Parent:
- 39:670133e7ffd8
- Child:
- 41:5df2bed2157d
diff -r 670133e7ffd8 -r c2538d97e78b main.cpp --- a/main.cpp Tue Jul 05 13:44:15 2016 +0000 +++ b/main.cpp Tue Jul 05 19:14:06 2016 +0000 @@ -52,7 +52,7 @@ *min = time/60; } -extern DigitalInOut BTRY_HTR_ENABLE; +extern DigitalOut BTRY_HTR_ENABLE; uint8_t HTR_CYCLE_COUNTS=0; //Count of heater cycles uint8_t HTR_CYCLE_START_DLY=0; //EPS_HTR_DLY_TIMER timer duration in minutes @@ -175,7 +175,7 @@ extern void FCTN_BCN_FEN(void const *args); extern void LONG_BCN_DATA(uint8_t* ); extern uint16_t gencrc16_for_me();//for calculating the crc of baehk data before sendingkk as including crc causes problem -extern DigitalInOut BTRY_HTR_ENABLE; + Timeout timeout_bcn; @@ -197,7 +197,7 @@ extern uint8_t EPS_BAT_TEMP_HIGH; extern uint8_t EPS_BAT_TEMP_DEFAULT; float EPS_BTRY_TMP_AVG; -extern DigitalInOut BTRY_HTR_ENABLE; + //extern void FCTN_BATTERYGAUGE_MAIN(float*Battery_parameters); @@ -207,7 +207,7 @@ //CDMS //eps cdms fault uint8_t CDMS_SW_STATUS; -DigitalInOut CDMS_OC_FAULT(PIN79); +DigitalIn CDMS_OC_FAULT(PIN79); bool CDMS_SW_ENABLE; int CDMS_FAULT_COUNTER = 0; @@ -224,7 +224,7 @@ //uint16_t BCN_TX_MAIN_COUNTER = 0; uint8_t BCN_LONG_MSG_TYPE = 1; -DigitalInOut BCN_TX_OC_FAULT(PIN80); +DigitalIn BCN_TX_OC_FAULT(PIN80); int BCN_TX_FAULT_COUNTER; //ACS @@ -232,23 +232,23 @@ //eps hw faults //uint8_t ACS_TR_Z_SW_STATUS; -DigitalInOut ACS_TR_Z_ENABLE(PIN40); -DigitalInOut ACS_TR_Z_OC_FAULT(PIN91); -DigitalInOut ACS_TR_Z_FAULT(PIN89); //Driver IC fault +DigitalOut ACS_TR_Z_ENABLE(PIN40); +DigitalIn ACS_TR_Z_OC_FAULT(PIN91); +DigitalIn ACS_TR_Z_FAULT(PIN89); //Driver IC fault int ACS_TR_Z_FAULT_COUNTER = 0; //uint8_t ACS_TR_XY_SW_STATUS; -DigitalInOut ACS_TR_XY_ENABLE(PIN71); -DigitalInOut ACS_TR_XY_OC_FAULT(PIN72); -DigitalInOut ACS_TR_XY_FAULT(PIN83); //Driver IC fault +DigitalOut ACS_TR_XY_ENABLE(PIN71); +DigitalIn ACS_TR_XY_OC_FAULT(PIN72); +DigitalIn ACS_TR_XY_FAULT(PIN83); //Driver IC fault int ACS_TR_XY_FAULT_COUNTER = 0; //bool ACS_ATS1_ENABLE; -DigitalInOut ACS_ATS1_OC_FAULT(PIN97); +DigitalIn ACS_ATS1_OC_FAULT(PIN97); int ACS_ATS1_FAULT_COUNTER = 0; //bool ACS_ATS2_ENABLE; -DigitalInOut ACS_ATS2_OC_FAULT(PIN5); +DigitalIn ACS_ATS2_OC_FAULT(PIN5); int ACS_ATS2_FAULT_COUNTER; //EPS @@ -314,8 +314,8 @@ bool if2check = 0; //ASSIGNING PINS// -DigitalInOut ATS1_SW_ENABLE(PTC0); // enable of att sens2 switch -DigitalInOut ATS2_SW_ENABLE(PTC16); // enable of att sens switch +DigitalOut ATS1_SW_ENABLE(PTC0); // enable of att sens2 switch +DigitalOut ATS2_SW_ENABLE(PTC16); // enable of att sens switch InterruptIn irpt_4m_mstr(PIN38); //I2c interrupt from CDMS DigitalOut irpt_2_mstr(PIN4); //I2C interrupt to CDMS I2CSlave slave (PIN1,PIN2);///pin1 pin2 @@ -328,16 +328,16 @@ //........faults //Polled Faults -DigitalInOut pf1(PIN5);//Attitude Sensor 1 OC bar fault signal -DigitalInOut pf2(PIN97);//Attitude Sensor 2 OC bar fault signal -DigitalInOut pf3(PIN83);//Fault Bar for TRXY driver +DigitalIn pf1(PIN5);//Attitude Sensor 1 OC bar fault signal +DigitalIn pf2(PIN97);//Attitude Sensor 2 OC bar fault signal +DigitalIn pf3(PIN83);//Fault Bar for TRXY driver -DigitalInOut TRXY_SW(PIN71); //TR XY Switch -DigitalInOut DRV_Z_EN(PIN88); //Sleep pin of driver z -DigitalInOut TRZ_SW(PIN40); //TR Z Switch +DigitalOut TRXY_SW(PIN71); //TR XY Switch +DigitalOut DRV_Z_EN(PIN88); //Sleep pin of driver z +DigitalOut TRZ_SW(PIN40); //TR Z Switch DigitalOut CDMS_RESET(PIN7,1); // CDMS RESET -DigitalInOut BCN_SW(PIN14); //Beacon switch -DigitalInOut DRV_XY_EN(PIN82); +DigitalOut BCN_SW(PIN14); //Beacon switch +DigitalOut DRV_XY_EN(PIN82);