aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Gamari2012-11-08 14:54:41 -0500
committerBen Gamari2012-11-08 14:54:41 -0500
commit9fea26e455c47bc2e59b494ae09422684493601e (patch)
treef20454e5dc0b01592becc8ff9d66b9f7f04d5c45 /lib
parent095e6cdb5dfacb715b5266ba3f76ed9021ef532e (diff)
stm32/usart: Add enable_/disable_error_interrupt
Diffstat (limited to 'lib')
-rw-r--r--lib/stm32/usart.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/stm32/usart.c b/lib/stm32/usart.c
index 5cf861b..454df41 100644
--- a/lib/stm32/usart.c
+++ b/lib/stm32/usart.c
@@ -398,6 +398,27 @@ void usart_disable_tx_interrupt(u32 usart)
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.