66:
67: out_w(USART_ICR(unit), USART_ICR_ALL); // Clear Interrupt
68: ClearInt(intno);
78: if( dev_ser_get_snddat(unit, &data)) {
79: out_w(USART_TDR(unit), data);
80: } else {
100:
101: out_w(USART_CR2(unit), mode & USART_CR2_STOP); // Set stop-bit
102: out_w(USART_CR3(unit), mode & (USART_CR3_RTSE | USART_CR3_CTSE)); // Set RTS/CTS
103: out_w(USART_BRR(unit), speed); // Set communication Speed
104:
105: /* Set mode & Start communication */
106: out_w(USART_CR1(unit),
107: USART_CR1_RXNEIE | USART_CR1_PEIE // Unmask Receive & Parity error interrupt
118: if(unit != DEVCNF_SER_DBGUN) {
119: out_w(USART_CR1(unit), 0);
120: } else { /* Used by T-Monitor */
121: out_w(USART_CR1(unit), USART_CR1_DEBUG);
122: }
141: case LLD_SER_START: /* Start communication */
142: out_w(USART_CR1(unit), 0);
143: out_w(USART_ICR(unit), USART_ICR_ALL); // Clear interrupt
144: ClearInt(INTNO_USART1 + unit);
155: if(in_w(USART_ISR(unit)) & USART_ISR_TXE) {
156: out_w(USART_TDR(unit), parm); // Set Transmission data
157: *(_UW*)( USART_CR1(unit)) |= USART_CR1_TXEIE; // Enable TXE interrupt
165: if(parm) {
166: out_w(USART_RQR(unit), USART_RQR_SBKRQ);
167: }