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:
- 48:9fd15e3e0b53
- Parent:
- 47:d59ba66229ce
- Child:
- 49:61c9f28332ba
diff -r d59ba66229ce -r 9fd15e3e0b53 main.cpp --- a/main.cpp Thu Jul 07 14:34:00 2016 +0000 +++ b/main.cpp Fri Jul 08 08:25:39 2016 +0000 @@ -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; +extern DigitalOut BTRY_HTR_ENABLE; Timeout timeout_bcn; @@ -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; @@ -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); -int ACS_ATS1_FAULT_COUNTER = 0; +DigitalIn ACS_ATS1_OC_FAULT(PIN5); +int ACS_TS1_FAULT_COUNTER = 0; //bool ACS_ATS2_ENABLE; -DigitalInOut ACS_ATS2_OC_FAULT(PIN5); +DigitalIn ACS_ATS2_OC_FAULT(PIN97); int ACS_ATS2_FAULT_COUNTER; //EPS @@ -328,13 +328,13 @@ //........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,1); //TR XY Switch +DigitalOut DRV_Z_EN(PIN88); //Sleep pin of driver z +DigitalOut TRZ_SW(PIN40,1); //TR Z Switch DigitalOut CDMS_RESET(PIN7,1); // CDMS RESET DigitalOut BCN_SW(PIN14,0); //Beacon switch DigitalInOut DRV_XY_EN(PIN82); @@ -347,7 +347,7 @@ void FLASH_INI() { - uint32_t read[8]; + uint t32_t read[8]; for(int i=0;i<8;i++) { read[i] = FCTN_BAE_RD_FLASH_ENTITY(i); @@ -979,7 +979,7 @@ void pollfault() { - if (pf1==0) // OC_ATS1 + if (ACS_ATS1_OC_FAULT==0) // OC_ATS1 { pf1check=1; actual_data.faultPoll_status |=0x01 ; @@ -988,7 +988,7 @@ else actual_data.faultPoll_status &= 0xFE; - if(pf2==0) + if(ACS_ATS2_OC_FAULT==0) { pf2check=1; actual_data.faultPoll_status |=0x02 ; @@ -997,7 +997,7 @@ else actual_data.faultPoll_status &= 0xFD; - if (pf3==0) + if (ACS_TR_XY_FAULT==0) { actual_data.faultPoll_status |=0x04 ; DRV_XY_EN = 0;