/******************************************************************************* * Function Name: UART_2_Start ******************************************************************************** * * Summary: * Invokes SCB_Init() and SCB_Enable(). * After this function call, the component is enabled and ready for operation. * When configuration is set to "Unconfigured SCB", the component must first be * initialized to operate in one of the following configurations: I2C, SPI, UART * or EZ I2C. Otherwise this function does not enable the component. * * Parameters: * None * * Return: * None * * Global variables: * UART_2_initVar - used to check initial configuration, modified * on first function call. * *******************************************************************************/ void UART_2_Start(void) { if(0u == UART_2_initVar) { UART_2_Init(); UART_2_initVar = 1u; /* Component was initialized */ } UART_2_Enable(); }
/******************************************************************************* * Function Name: UART_2_Wakeup ******************************************************************************** * * Summary: * Restores and enables the user configuration. Should be called * just after awaking from sleep. * * Parameters: * None. * * Return: * None. * * Global Variables: * UART_2_backup - used when non-retention registers are restored. * * Reentrant: * No. * *******************************************************************************/ void UART_2_Wakeup(void) { UART_2_RestoreConfig(); #if( (UART_2_RX_ENABLED) || (UART_2_HD_ENABLED) ) UART_2_ClearRxBuffer(); #endif /* End (UART_2_RX_ENABLED) || (UART_2_HD_ENABLED) */ #if(UART_2_TX_ENABLED || UART_2_HD_ENABLED) UART_2_ClearTxBuffer(); #endif /* End UART_2_TX_ENABLED || UART_2_HD_ENABLED */ if(UART_2_backup.enableState != 0u) { UART_2_Enable(); } }