Added internal pullup to RXDx pins.
This commit is contained in:
@@ -214,6 +214,9 @@ bool rs485_baud_rate_set(
|
|||||||
static void rs485_usart_init(
|
static void rs485_usart_init(
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
|
/* enable the internal pullup on RXD0 */
|
||||||
|
BIT_CLEAR(DDRD, DDD0);
|
||||||
|
BIT_SET(PORTD, PD0);
|
||||||
/* enable Transmit and Receive */
|
/* enable Transmit and Receive */
|
||||||
UCSR0B = _BV(TXEN0) | _BV(RXEN0);
|
UCSR0B = _BV(TXEN0) | _BV(RXEN0);
|
||||||
/* Set USART Control and Status Register n C */
|
/* Set USART Control and Status Register n C */
|
||||||
|
|||||||
@@ -165,6 +165,9 @@ bool serial_baud_rate_set(
|
|||||||
static void serial_usart_init(
|
static void serial_usart_init(
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
|
/* enable the internal pullup on RXD1 */
|
||||||
|
BIT_CLEAR(DDRD, DDD2);
|
||||||
|
BIT_SET(PORTD, PD2);
|
||||||
/* enable Transmit and Receive */
|
/* enable Transmit and Receive */
|
||||||
UCSR1B = _BV(TXEN1) | _BV(RXEN1);
|
UCSR1B = _BV(TXEN1) | _BV(RXEN1);
|
||||||
/* Set USART Control and Status Register n C */
|
/* Set USART Control and Status Register n C */
|
||||||
|
|||||||
Reference in New Issue
Block a user