Added internal pullup to RXDx pins.

This commit is contained in:
skarg
2010-08-06 02:28:07 +00:00
parent a194a7b585
commit ea2906b317
2 changed files with 6 additions and 0 deletions
@@ -214,6 +214,9 @@ bool rs485_baud_rate_set(
static void rs485_usart_init(
void)
{
/* enable the internal pullup on RXD0 */
BIT_CLEAR(DDRD, DDD0);
BIT_SET(PORTD, PD0);
/* enable Transmit and Receive */
UCSR0B = _BV(TXEN0) | _BV(RXEN0);
/* Set USART Control and Status Register n C */
@@ -165,6 +165,9 @@ bool serial_baud_rate_set(
static void serial_usart_init(
void)
{
/* enable the internal pullup on RXD1 */
BIT_CLEAR(DDRD, DDD2);
BIT_SET(PORTD, PD2);
/* enable Transmit and Receive */
UCSR1B = _BV(TXEN1) | _BV(RXEN1);
/* Set USART Control and Status Register n C */