/** * @brief Deactivates the UART peripheral. * * @param[in] uartp pointer to the @p UARTDriver object * * @api */ void uartStop(UARTDriver *uartp) { osalDbgCheck(uartp != NULL); osalSysLock(); osalDbgAssert((uartp->state == UART_STOP) || (uartp->state == UART_READY), "invalid state"); uart_lld_stop(uartp); uartp->state = UART_STOP; uartp->txstate = UART_TX_IDLE; uartp->rxstate = UART_RX_IDLE; osalSysUnlock(); }
/** * @brief Deactivates the UART peripheral. * * @param[in] uartp pointer to the @p UARTDriver object * * @api */ void uartStop(UARTDriver *uartp) { chDbgCheck(uartp != NULL, "uartStop"); chSysLock(); chDbgAssert((uartp->state == UART_STOP) || (uartp->state == UART_READY), "uartStop(), #1", "invalid state"); uart_lld_stop(uartp); uartp->state = UART_STOP; uartp->txstate = UART_TX_IDLE; uartp->rxstate = UART_RX_IDLE; chSysUnlock(); }