git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4856 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
4d8b799e7a
commit
3fbe4a0bac
|
@ -191,14 +191,14 @@ static void usart_start(UARTDriver *uartp) {
|
|||
|
||||
/* Note that some bits are enforced because required for correct driver
|
||||
operations.*/
|
||||
u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = uartp->config->cr3 | USART_CR3_DMAT | USART_CR3_DMAR |
|
||||
USART_CR3_EIE;
|
||||
if (uartp->config->txend2_cb == NULL)
|
||||
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE;
|
||||
else
|
||||
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE |
|
||||
USART_CR1_TCIE;
|
||||
u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = uartp->config->cr3 | USART_CR3_DMAT | USART_CR3_DMAR |
|
||||
USART_CR3_EIE;
|
||||
u->CR1 = uartp->config->cr1 | cr1;
|
||||
|
||||
/* Starting the receiver idle loop.*/
|
||||
|
|
|
@ -178,14 +178,14 @@ static void usart_start(UARTDriver *uartp) {
|
|||
|
||||
/* Note that some bits are enforced because required for correct driver
|
||||
operations.*/
|
||||
u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = uartp->config->cr3 | USART_CR3_DMAT | USART_CR3_DMAR |
|
||||
USART_CR3_EIE;
|
||||
if (uartp->config->txend2_cb == NULL)
|
||||
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE;
|
||||
else
|
||||
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE |
|
||||
USART_CR1_TCIE;
|
||||
u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = uartp->config->cr3 | USART_CR3_DMAT | USART_CR3_DMAR |
|
||||
USART_CR3_EIE;
|
||||
u->CR1 = uartp->config->cr1 | cr1;
|
||||
|
||||
/* Starting the receiver idle loop.*/
|
||||
|
|
Loading…
Reference in New Issue