This init function configures the serial port.
Definition at line 154 of file uart.c. References BAUD_RATE, RXD_BIT, RXD_DDR, RXD_PORT, TXD_BIT, and TXD_DDR. Referenced by init_InitModules(). {
RXD_DDR &= ~(1U << RXD_BIT); /* set RXD as input pin */
TXD_DDR |= (1U << TXD_BIT); /* set TXD as output pin */
RXD_PORT |= (1U << RXD_BIT); /* activate RXD pull-up resistor */
/* Enable TXEN and RXEN in register UCR */
UCR = (1 << TXEN0)|(1 << RXEN0);
/* set baudrate prescaler */
UBRR = (F_CPU / (BAUD_RATE * 16L) - 1U);
}
Here is the caller graph for this function:
![]() |
1.7.2