stm32/usart: Add enable_/disable_error_interrupt
This commit is contained in:
parent
095e6cdb5d
commit
9fea26e455
@ -371,6 +371,8 @@ void usart_enable_rx_interrupt(u32 usart);
|
|||||||
void usart_disable_rx_interrupt(u32 usart);
|
void usart_disable_rx_interrupt(u32 usart);
|
||||||
void usart_enable_tx_interrupt(u32 usart);
|
void usart_enable_tx_interrupt(u32 usart);
|
||||||
void usart_disable_tx_interrupt(u32 usart);
|
void usart_disable_tx_interrupt(u32 usart);
|
||||||
|
void usart_enable_error_interrupt(u32 usart);
|
||||||
|
void usart_disable_error_interrupt(u32 usart);
|
||||||
bool usart_get_flag(u32 usart, u32 flag);
|
bool usart_get_flag(u32 usart, u32 flag);
|
||||||
bool usart_get_interrupt_source(u32 usart, u32 flag);
|
bool usart_get_interrupt_source(u32 usart, u32 flag);
|
||||||
|
|
||||||
|
@ -398,6 +398,27 @@ void usart_disable_tx_interrupt(u32 usart)
|
|||||||
USART_CR1(usart) &= ~USART_CR1_TXEIE;
|
USART_CR1(usart) &= ~USART_CR1_TXEIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
/** @brief USART Error Interrupt Enable.
|
||||||
|
|
||||||
|
@param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base
|
||||||
|
*/
|
||||||
|
|
||||||
|
void usart_enable_error_interrupt(u32 usart)
|
||||||
|
{
|
||||||
|
USART_CR3(usart) |= USART_CR3_EIE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
/** @brief USART Error Interrupt Disable.
|
||||||
|
|
||||||
|
@param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base
|
||||||
|
*/
|
||||||
|
|
||||||
|
void usart_disable_error_interrupt(u32 usart)
|
||||||
|
{
|
||||||
|
USART_CR3(usart) &= ~USART_CR3_EIE;
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/** @brief USART Read a Status Flag.
|
/** @brief USART Read a Status Flag.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user