sam3x: Add usart funciton to enable rx interrupt.
This commit is contained in:
parent
e2eadfddb8
commit
05fb6fa19f
@ -210,6 +210,8 @@ void usart_wait_send_ready(u32 usart);
|
|||||||
void usart_wait_recv_ready(u32 usart);
|
void usart_wait_recv_ready(u32 usart);
|
||||||
void usart_send_blocking(u32 usart, u16 data);
|
void usart_send_blocking(u32 usart, u16 data);
|
||||||
u16 usart_recv_blocking(u32 usart);
|
u16 usart_recv_blocking(u32 usart);
|
||||||
|
void usart_enable_rx_interrupt(u32 usart);
|
||||||
|
void usart_disable_rx_interrupt(u32 usart);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -97,3 +97,13 @@ u16 usart_recv_blocking(u32 usart)
|
|||||||
return usart_recv(usart);
|
return usart_recv(usart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void usart_enable_rx_interrupt(u32 usart)
|
||||||
|
{
|
||||||
|
USART_IER(usart) = USART_CSR_RXRDY;
|
||||||
|
}
|
||||||
|
|
||||||
|
void usart_disable_rx_interrupt(u32 usart)
|
||||||
|
{
|
||||||
|
USART_IDR(usart) = USART_CSR_RXRDY;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user