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); // disable pullup on TXD pin |
PORTB &= ~(1 << PORTB3); |
} |
|
/** |
64,11 → 64,12 |
*/ |
void usart1_EnableTXD(void) { |
DDRB |= (1<<DDB3); // set TXD pin as output |
PORTB &= ~(1 << PORTB3); // disable pullup on TXD pin |
PORTB &= ~(1 << PORTB3); |
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 |
*/ |
92,7 → 93,7 |
* transmit interrupt handler |
* unused |
*/ |
ISR(SIG_USART1_DATA) { |
SIGNAL(SIG_USART1_DATA) { |
} |
|
/** |
245,8 → 246,7 |
|
unsigned char mstenth = ms/10; |
sendMKData(label, address, &mstenth, 1); |
// wait until UDR ready |
while (!(UCSR1A & (1 << UDRE1))); |
|
// disable TXD pin again |
usart1_DisableTXD(); |
} |