mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
AVR: Fix some spacing issues
This commit is contained in:
@@ -218,8 +218,9 @@ void usart_reset(uintptr_t usart_base)
|
|||||||
/* Disable RX and TX, put USART in reset, disable handshaking signals */
|
/* Disable RX and TX, put USART in reset, disable handshaking signals */
|
||||||
|
|
||||||
usart_putreg(usart_base, AVR32_USART_CR_OFFSET,
|
usart_putreg(usart_base, AVR32_USART_CR_OFFSET,
|
||||||
USART_CR_RSTRX|USART_CR_RSTTX|USART_CR_RSTSTA|USART_CR_RSTIT|
|
USART_CR_RSTRX | USART_CR_RSTTX | USART_CR_RSTSTA |
|
||||||
USART_CR_RSTNACK|USART_CR_DTRDIS|USART_CR_RTSDIS);
|
USART_CR_RSTIT | USART_CR_RSTNACK | USART_CR_DTRDIS |
|
||||||
|
USART_CR_RTSDIS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ static int up_interrupt(int irq, void *context)
|
|||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,8 +607,8 @@ static void up_rxint(struct uart_dev_s *dev, bool enable)
|
|||||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||||
# ifdef CONFIG_USART_ERRINTS
|
# ifdef CONFIG_USART_ERRINTS
|
||||||
up_serialout(priv, AVR32_USART_IER_OFFSET,
|
up_serialout(priv, AVR32_USART_IER_OFFSET,
|
||||||
USART_INT_RXRDY|USART_INT_TIMEOUT|
|
USART_INT_RXRDY | USART_INT_TIMEOUT | USART_INT_OVRE |
|
||||||
USART_INT_OVRE|USART_INT_FRAME|USART_INT_PARE);
|
USART_INT_FRAME | USART_INT_PARE);
|
||||||
# else
|
# else
|
||||||
up_serialout(priv, AVR32_USART_IER_OFFSET,
|
up_serialout(priv, AVR32_USART_IER_OFFSET,
|
||||||
USART_INT_RXRDY | USART_INT_TIMEOUT);
|
USART_INT_RXRDY | USART_INT_TIMEOUT);
|
||||||
@@ -617,8 +618,8 @@ static void up_rxint(struct uart_dev_s *dev, bool enable)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
up_serialout(priv, AVR32_USART_IDR_OFFSET,
|
up_serialout(priv, AVR32_USART_IDR_OFFSET,
|
||||||
USART_INT_RXRDY|USART_INT_TIMEOUT|
|
USART_INT_RXRDY | USART_INT_TIMEOUT | USART_INT_OVRE |
|
||||||
USART_INT_OVRE|USART_INT_FRAME|USART_INT_PARE);
|
USART_INT_FRAME | USART_INT_PARE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,7 @@
|
|||||||
# error "Cannot represent this timer frequency"
|
# error "Cannot represent this timer frequency"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/* Eg. CPU_CLOCK = 8MHz, CLOCKS_PER_SEC = 100
|
||||||
* Eg. CPU_CLOCK = 8MHz, CLOCKS_PER_SEC = 100
|
|
||||||
*
|
*
|
||||||
* MATCH1 ((8000000 + 50) / 100) = 80,000 FREQ=100.0Hz
|
* MATCH1 ((8000000 + 50) / 100) = 80,000 FREQ=100.0Hz
|
||||||
* MATCH8 ((1000000 + 50) / 100) = 10,000 FREQ=100.0Hz <-- this one
|
* MATCH8 ((1000000 + 50) / 100) = 10,000 FREQ=100.0Hz <-- this one
|
||||||
|
|||||||
@@ -92,8 +92,7 @@
|
|||||||
# error "Cannot represent this timer frequency"
|
# error "Cannot represent this timer frequency"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/* Eg. CPU_CLOCK = 8MHz, CLOCKS_PER_SEC = 100
|
||||||
* Eg. CPU_CLOCK = 8MHz, CLOCKS_PER_SEC = 100
|
|
||||||
*
|
*
|
||||||
* MATCH1 ((8000000 + 50) / 100) = 80,000 FREQ=100.0Hz
|
* MATCH1 ((8000000 + 50) / 100) = 80,000 FREQ=100.0Hz
|
||||||
* MATCH8 ((1000000 + 50) / 100) = 10,000 FREQ=100.0Hz <-- this one
|
* MATCH8 ((1000000 + 50) / 100) = 10,000 FREQ=100.0Hz <-- this one
|
||||||
|
|||||||
Reference in New Issue
Block a user