stm32: uart: Add Trasmission Complete enable/disable interrupt functions
This commit is contained in:
committed by
Karl Palsson
parent
174d3400dd
commit
b47d769369
@@ -120,6 +120,8 @@ void usart_enable_rx_interrupt(uint32_t usart);
|
|||||||
void usart_disable_rx_interrupt(uint32_t usart);
|
void usart_disable_rx_interrupt(uint32_t usart);
|
||||||
void usart_enable_tx_interrupt(uint32_t usart);
|
void usart_enable_tx_interrupt(uint32_t usart);
|
||||||
void usart_disable_tx_interrupt(uint32_t usart);
|
void usart_disable_tx_interrupt(uint32_t usart);
|
||||||
|
void usart_enable_tx_complete_interrupt(uint32_t usart);
|
||||||
|
void usart_disable_tx_complete_interrupt(uint32_t usart);
|
||||||
void usart_enable_error_interrupt(uint32_t usart);
|
void usart_enable_error_interrupt(uint32_t usart);
|
||||||
void usart_disable_error_interrupt(uint32_t usart);
|
void usart_disable_error_interrupt(uint32_t usart);
|
||||||
bool usart_get_flag(uint32_t usart, uint32_t flag);
|
bool usart_get_flag(uint32_t usart, uint32_t flag);
|
||||||
|
|||||||
@@ -350,6 +350,32 @@ void usart_disable_tx_interrupt(uint32_t usart)
|
|||||||
USART_CR1(usart) &= ~USART_CR1_TXEIE;
|
USART_CR1(usart) &= ~USART_CR1_TXEIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* @brief USART Transmission Complete Interrupt Enable
|
||||||
|
*
|
||||||
|
* @param[in] usart unsigned 32 bit. USART block register address base @ref
|
||||||
|
usart_reg_base
|
||||||
|
*/
|
||||||
|
|
||||||
|
void usart_enable_tx_complete_interrupt(uint32_t usart)
|
||||||
|
{
|
||||||
|
USART_CR1(usart) |= USART_CR1_TCIE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* @brief USART Transmission Complete Interrupt Disable
|
||||||
|
*
|
||||||
|
* @param[in] usart unsigned 32 bit. USART block register address base @ref
|
||||||
|
usart_reg_base
|
||||||
|
*/
|
||||||
|
|
||||||
|
void usart_disable_tx_complete_interrupt(uint32_t usart)
|
||||||
|
{
|
||||||
|
USART_CR1(usart) &= ~USART_CR1_TCIE;
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/** @brief USART Error Interrupt Enable.
|
/** @brief USART Error Interrupt Enable.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user