/** * @brief Low level serial driver stop. * @details De-initializes the USART, stops the associated clock, resets the * interrupt vector. * * @param[in] sdp pointer to a @p SerialDriver object * * @notapi */ void sd_lld_stop(SerialDriver *sdp) { #if AVR_SERIAL_USE_USART0 if (&SD1 == sdp) usart0_deinit(); #endif #if AVR_SERIAL_USE_USART1 if (&SD2 == sdp) usart1_deinit(); #endif }
/** * @brief Low level serial driver stop. * @details De-initializes the USART, stops the associated clock, resets the * interrupt vector. * * @param[in] sdp pointer to a @p SerialDriver object * * @notapi */ void sd_lld_stop(SerialDriver *sdp) { #if USE_MSP430_USART0 if (&SD1 == sdp) { usart0_deinit(); return; } #endif #if USE_MSP430_USART1 if (&SD2 == sdp) { usart1_deinit(); return; } #endif }