git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2672 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
1b43d44a84
commit
00f3c1b8f3
|
@ -98,7 +98,8 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
|
|||
* Note that some bits are enforced.
|
||||
*/
|
||||
u->CR1 = config->sc_cr1 | USART_CR1_UE | USART_CR1_PEIE |
|
||||
USART_CR1_RXNEIE | USART_CR1_RE;
|
||||
USART_CR1_RXNEIE | USART_CR1_TE |
|
||||
USART_CR1_RE;
|
||||
u->CR2 = config->sc_cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = config->sc_cr3 | USART_CR3_EIE;
|
||||
u->SR = 0;
|
||||
|
@ -175,10 +176,8 @@ static void serve_interrupt(SerialDriver *sdp) {
|
|||
chIOAddFlagsI(sdp, IO_OUTPUT_EMPTY);
|
||||
u->CR1 = cr1 & ~USART_CR1_TXEIE;
|
||||
}
|
||||
else {
|
||||
else
|
||||
u->DR = b;
|
||||
u->CR1 = cr1 | USART_CR1_TE;
|
||||
}
|
||||
chSysUnlockFromIsr();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue