/** ****************************************************************************** * @file ui_task.c * @author Motor Control SDK Team, ST Microelectronics * @brief This file implementes user interface tasks definition * ****************************************************************************** * @attention * *

© Copyright (c) 2019 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "License"; You may not use this file except in compliance with * the License. You may obtain a copy of the License at: * www.st.com/SLA0044 * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ /* Pre-compiler coherency check */ #include "ui_task.h" #include "mc_config.h" #include "parameters_conversion.h" #define OPT_DACX 0x20 /*!_Super = UI_Params; UFCP_Init( & pUSART ); MCP_Init(pMCP, (FCP_Handle_t *) & pUSART, & UFCP_Send, & UFCP_Receive, & UFCP_AbortReceive, s_fwVer); UI_Init( &pMCP->_Super, bMCNum, pMCIList, pMCTList, pUICfg ); /* Initialize UI and link MC components */ } __weak void UI_Scheduler(void) { if(bUITaskCounter > 0u) { bUITaskCounter--; } if(bCOMTimeoutCounter > 1u) { bCOMTimeoutCounter--; } if(bCOMATRTimeCounter > 1u) { bCOMATRTimeCounter--; } } __weak MCP_Handle_t * GetMCP(void) { return pMCP; } __weak bool UI_IdleTimeHasElapsed(void) { bool retVal = false; if (bUITaskCounter == 0u) { retVal = true; } return (retVal); } __weak void UI_SetIdleTime(uint16_t SysTickCount) { bUITaskCounter = SysTickCount; } __weak bool UI_SerialCommunicationTimeOutHasElapsed(void) { bool retVal = false; if (bCOMTimeoutCounter == 1u) { bCOMTimeoutCounter = 0u; retVal = true; } return (retVal); } __weak bool UI_SerialCommunicationATRTimeHasElapsed(void) { bool retVal = false; if (bCOMATRTimeCounter == 1u) { bCOMATRTimeCounter = 0u; retVal = true; } return (retVal); } __weak void UI_SerialCommunicationTimeOutStop(void) { bCOMTimeoutCounter = 0u; } __weak void UI_SerialCommunicationTimeOutStart(void) { bCOMTimeoutCounter = SERIALCOM_TIMEOUT_OCCURENCE_TICKS; } /******************* (C) COPYRIGHT 2019 STMicroelectronics *****END OF FILE****/