Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 388 → Rev 389

/C-OSD/trunk/usart1.c
53,10 → 53,10
* disable the txd pin of usart1
*/
void usart1_DisableTXD(void) {
//UCSR1B &= ~(1 << TXCIE1); // disable TX-Interrupt
UCSR1B &= ~(1 << TXCIE1); // disable TX-Interrupt
UCSR1B &= ~(1 << TXEN1); // disable TX in USART
DDRB &= ~(1<<DDB3); // set TXD pin as input
PORTB &= ~(1 << PORTB3);
PORTB &= ~(1 << PORTB3); // disable pullup on TXD pin
}
 
/**
64,12 → 64,11
*/
void usart1_EnableTXD(void) {
DDRB |= (1<<DDB3); // set TXD pin as output
PORTB &= ~(1 << PORTB3);
PORTB &= ~(1 << PORTB3); // disable pullup on TXD pin
UCSR1B |= (1 << TXEN1); // enable TX in USART
//UCSR1B |= (1 << TXCIE1); // enable TX-Interrupt
UCSR1B |= (1 << TXCIE1); // enable TX-Interrupt
}
 
 
/**
* send a single <character> through usart1
*/
93,7 → 92,7
* transmit interrupt handler
* unused
*/
SIGNAL(SIG_USART1_DATA) {
ISR(SIG_USART1_DATA) {
}
 
/**
246,7 → 245,8
 
unsigned char mstenth = ms/10;
sendMKData(label, address, &mstenth, 1);
// wait until UDR ready
while (!(UCSR1A & (1 << UDRE1)));
// disable TXD pin again
usart1_DisableTXD();
}