.name = '0',
.r_udr = UDR0,
+ .u2x = AVR_IO_REGBIT(UCSR0A, U2X0),
.txen = AVR_IO_REGBIT(UCSR0B, TXEN0),
.rxen = AVR_IO_REGBIT(UCSR0B, RXEN0),
.ucsz = AVR_IO_REGBITS(UCSR0C, UCSZ00, 0x3), // 2 bits
.name = '1',
.r_udr = UDR1,
+ .u2x = AVR_IO_REGBIT(UCSR1A, U2X1),
.txen = AVR_IO_REGBIT(UCSR1B, TXEN1),
.rxen = AVR_IO_REGBIT(UCSR1B, RXEN1),
.ucsz = AVR_IO_REGBITS(UCSR1C, UCSZ10, 0x3), // 2 bits
//uint8_t udre = avr_regbit_get(avr, p->udrc.raised);
uint8_t txc = avr_regbit_get(avr, p->txc.raised);
- // no need to write this value in here, only the
- // interrupt flags need clearing!
- // avr_core_watch_write(avr, addr, v);
+ // required for u2x (double uart transmission speed)
+ avr_core_watch_write(avr, addr, v);
//avr_clear_interrupt_if(avr, &p->udrc, udre);
avr_clear_interrupt_if(avr, &p->txc, txc);