/* -------------------------- (C) COPYRIGHT 2022 Fortiortech ShenZhen ---------------------------*/ /** * @copyright (C) COPYRIGHT 2022 Fortiortech Shenzhen * @file LED.c * @author Fortiortech Appliction Team * @since Create:2022-07-14 * @date Last modify:2022-07-18 * @note Last modify author is Leo.li * @brief */ /* Includes -------------------------------------------------------------------------------------*/ #include #include /* Private variables ----------------------------------------------------------------------------*/ LEDCtl_TypeDef LEDCtl; #define LED_Time 20 //uint8 LED_Time = 20; void LedDisplay(uint8 uLedMask) { // LEDCtl.LEDCnt++; // GP12 = 0; // GP16 = 0; // GP21 = 0; // // if(LEDCtl.LEDCnt<=(LED_Time*1)) // { // if(uLedMask & LED1_MASK) //if(LED1==1) //D11 // { // SetBit(P1_OE, P12); // ClrBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 1; // GP16 = 0; // GP21 = 0; // // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // // } // } // else if (LEDCtl.LEDCnt<=(LED_Time*2)) // { // if (uLedMask & LED2_MASK) //if(LED2==1) //D8 // { // SetBit(P1_OE, P12); // ClrBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 1; // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // // } // } // else if (LEDCtl.LEDCnt<=(LED_Time*3)) // { // if (uLedMask & LED3_MASK) //if(LED3==1) //D7 // { // ClrBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 1; // // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // } // } // else if (LEDCtl.LEDCnt<=(LED_Time*4)) // { // if (uLedMask & LED4_MASK) //if(LED4==1) //D10 // { // ClrBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 1; // GP21 = 0; // // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // // } // } // else if (LEDCtl.LEDCnt<=(LED_Time*5)) // { // if (uLedMask & LED5_MASK) //if(LED5==1) //D9 // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // ClrBit(P2_OE, P21); // GP12 = 1; // GP16 = 0; // GP21 = 0; // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // // } // } // else if (LEDCtl.LEDCnt<=(LED_Time*6)) // { // if (uLedMask & LED6_MASK) //if(LED6==1) //D6 // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // ClrBit(P2_OE, P21); // GP12 = 0; // GP16 = 1; // GP21 = 0; // // } // else // { // SetBit(P1_OE, P12); // SetBit(P1_OE, P16); // SetBit(P2_OE, P21); // GP12 = 0; // GP16 = 0; // GP21 = 0; // // } // } // else if ((LEDCtl.LEDCnt <= (LED_Time*6+1))&&(mcFocCtrl.NTCValueGatherFlag==1)) // { // #if (NTCSignalENABLE==1) // { // ClrBit(P1_OE, P12); // ClrBit(P1_OE, P16); // ClrBit(P2_OE, P21); // // SetBit(ADC_MASK, CH8EN); // SetBit(P2_AN, PIN1); // } // #endif // } // else if ((LEDCtl.LEDCnt <= (LED_Time*6+5))&&(mcFocCtrl.NTCValueGatherFlag==1)) // { // //延迟5个载波时间,待NTC信号稳定再采集NTC信号 // } // else if ((LEDCtl.LEDCnt <= (LED_Time*6+15))&&(mcFocCtrl.NTCValueGatherFlag==1)) // { // #if (NTCSignalENABLE==1) // { // mcFocCtrl.NTCValue = ADC8_DR; /* -----采集NTC温度----- */ // } // #endif // } // else // { // #if (NTCSignalENABLE==1) // { // mcFocCtrl.NTCValueGatherFlag =0; // ClrBit(ADC_MASK, CH8EN); // ClrBit(P2_AN, PIN1); // } // #endif // LEDCtl.LEDCnt = 0; // } }