static void uart3_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { uint16_t period = uart_period(rate); UCSR3A = BV(U2X3); UBRR3H = period >> 8; UBRR3L = period; }
static void uart0_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { uint16_t period = uart_period(rate); #if !CPU_AVR_ATMEGA103 UBRR0H = period >> 8; #endif UBRR0L = period; }
static void uart0_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { uint16_t period = uart_period(rate); #if !CPU_AVR_ATMEGA103 UCSR0A = BV(U2X0); /* The Arduino Uno bootloader turns on U2X0 */ \ UBRR0H = period >> 8; #endif UBRR0L = period; }
static void uart2_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { uint16_t period = uart_period(rate); UBRR2H = period >> 8; UBRR2L = period; }