//----------------------------------------------------------------------------- /// \file CddSwi.c /// /// \brief Specific code for Cdd Switch /// /// \author MES-LYG //----------------------------------------------------------------------------- //============================================================================= // Includes //============================================================================= #include #include #include #include //============================================================================= // Defines and Typedef //============================================================================= //============================================================================= // Static variable declarations //============================================================================= //============================================================================= // Function prototypes //============================================================================= //============================================================================= // Macros //============================================================================= //----------------------------------------------------------------------------- // Start declaration or definitions of functions //----------------------------------------------------------------------------- #define ctadCddSwi_START_SEC_CODE #include //============================================================================= // Function definitions //============================================================================= //----------------------------------------------------------------------------- /// \brief CddSwi_Init /// /// \descr intialisation /// /// \param void /// /// \return void //----------------------------------------------------------------------------- void CddSwi_Init(void) { CddSwi_Rou_Init(); } //----------------------------------------------------------------------------- /// \brief CddSwi_Cycle10ms /// /// \descr cyclic behaviour /// /// \param void /// /// \return void //----------------------------------------------------------------------------- void CddSwi_Cycle10ms(void) { CddSwi_Rou_Cycle10ms(); } //----------------------------------------------------------------------------- /// \brief CddSwi_SetSleep_Wakeup /// /// \descr This function is called when the Hss to sleep or wakeup. /// /// \param ucDormancyRouse:1 sleep mode 0:wakeup mode /// /// \return boDormancy_Rouse //----------------------------------------------------------------------------- void CddSwi_SetSleep_Wakeup(uint8 ucDormancyRouse) { CddSwi_Rou_SetSleep_Wakeup(ucDormancyRouse); } //----------------------------------------------------------------------------- /// \brief CddSwi_GetSleepStat /// /// \descr This function get the Hss to Sleep or wakeup stat. /// /// \param /// /// \return boSleepStat //----------------------------------------------------------------------------- boolean CddSwi_GetSleepStat(void) { boolean boSleepStat; boSleepStat = CddSwi_Rou_GetSleepStat(); return boSleepStat; } //----------------------------------------------------------------------------- /// \brief CddSwi_New_request /// /// \descr This function is called for HSS output setting /// When request is changed from ctrlswi. /// /// \param void /// /// \return void //----------------------------------------------------------------------------- void CddSwi_New_request(uint8 ulChnIdx, uint8 ucNew_request) { CddSwi_Rou_New_request(ulChnIdx, ucNew_request); } //----------------------------------------------------------------------------- /// \brief CddSwi_SetTgt /// /// \descr set target value on HSS channel /// /// \param ulChnIdx /// \param unTagVal /// /// \return void //----------------------------------------------------------------------------- void CddSwi_SetTgt(const uint32 ulChnIdx, const uint16 unTgtVal) { // evaluate the target value and set the output CddSwi_Rou_SetTgt(ulChnIdx, unTgtVal); } //----------------------------------------------------------------------------- /// \brief CddSwi_SetSpiOut /// /// \descr Spi SyncTransmit to OutPut on HSS /// /// \param /// /// \return void //----------------------------------------------------------------------------- void CddSwi_SetSpiOut() { // Spi SyncTransmit set the output on HSS CddSwi_Rou_SetSpiOut(); } //----------------------------------------------------------------------------- /// \brief CddSwi_GetState /// /// \descr return switch state on HSS channel /// /// \param ulChnIdx /// /// \return tisSwitchStatus //----------------------------------------------------------------------------- tisSwitchStatus CddSwi_GetState(const uint32 ulChnIdx) { tisSwitchStatus tSwitchStatus; tSwitchStatus = CddSwi_Rou_GetState(ulChnIdx); return tSwitchStatus; } //----------------------------------------------------------------------------- /// \brief CddSwi_DeInit /// /// \descr intialisation /// /// \param void /// /// \return void //----------------------------------------------------------------------------- void CddSwi_DeInit(void) { CddSwi_Rou_DeInit(); } #define ctadCddSwi_STOP_SEC_CODE #include //----------------------------------------------------------------------------- // End declaration or definitions of functions //-----------------------------------------------------------------------------