git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15752 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
c35225ea9b
commit
cc6fdedf79
|
@ -165,26 +165,16 @@ __STATIC_INLINE void usart_enable_rx_irq(SIODriver *siop) {
|
||||||
}
|
}
|
||||||
|
|
||||||
__STATIC_INLINE void usart_enable_rx_errors_irq(SIODriver *siop) {
|
__STATIC_INLINE void usart_enable_rx_errors_irq(SIODriver *siop) {
|
||||||
uint32_t cr1, cr2, cr3;
|
|
||||||
|
|
||||||
cr1 = siop->usart->CR1;
|
siop->usart->CR1 |= __sio_reloc_field(siop->enabled, SIO_EV_PARITY_ERR, SIO_EV_PARITY_ERR_POS, USART_CR1_PEIE_Pos);
|
||||||
cr2 = siop->usart->CR2;
|
siop->usart->CR2 |= __sio_reloc_field(siop->enabled, SIO_EV_BREAK, SIO_EV_BREAK_POS, USART_CR2_LBDIE_Pos);
|
||||||
cr3 = siop->usart->CR3;
|
|
||||||
|
|
||||||
cr1 |= __sio_reloc_field(siop->enabled, SIO_EV_PARITY_ERR, SIO_EV_PARITY_ERR_POS, USART_CR1_PEIE_Pos);
|
|
||||||
cr2 |= __sio_reloc_field(siop->enabled, SIO_EV_BREAK, SIO_EV_BREAK_POS, USART_CR2_LBDIE_Pos);
|
|
||||||
|
|
||||||
/* The following 3 are grouped.*/
|
/* The following 3 are grouped.*/
|
||||||
if ((siop->enabled & (SIO_EV_FRAMING_ERR |
|
if ((siop->enabled & (SIO_EV_FRAMING_ERR |
|
||||||
SIO_EV_OVERRUN_ERR |
|
SIO_EV_OVERRUN_ERR |
|
||||||
SIO_EV_NOISE_ERR)) != 0U) {
|
SIO_EV_NOISE_ERR)) != 0U) {
|
||||||
cr3 |= USART_CR3_EIE;
|
siop->usart->CR3 |= USART_CR3_EIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setting up the operation.*/
|
|
||||||
siop->usart->CR1 = cr1;
|
|
||||||
siop->usart->CR2 = cr2;
|
|
||||||
siop->usart->CR3 = cr3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__STATIC_INLINE void usart_enable_tx_irq(SIODriver *siop) {
|
__STATIC_INLINE void usart_enable_tx_irq(SIODriver *siop) {
|
||||||
|
|
Loading…
Reference in New Issue