aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/AVR/serial_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/AVR/serial_lld.c')
-rw-r--r--os/hal/platforms/AVR/serial_lld.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/os/hal/platforms/AVR/serial_lld.c b/os/hal/platforms/AVR/serial_lld.c
index 1f1bef013..166663c44 100644
--- a/os/hal/platforms/AVR/serial_lld.c
+++ b/os/hal/platforms/AVR/serial_lld.c
@@ -29,31 +29,42 @@
#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
-#if USE_AVR_USART0 || defined(__DOXYGEN__)
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
/**
* @brief USART0 serial driver identifier.
* @note The name does not follow the convention used in the other ports
* (COMn) because a name conflict with the AVR headers.
*/
+#if USE_AVR_USART0 || defined(__DOXYGEN__)
SerialDriver SD1;
#endif
-#if USE_AVR_USART1 || defined(__DOXYGEN__)
+
/**
* @brief USART1 serial driver identifier.
* @note The name does not follow the convention used in the other ports
* (COMn) because a name conflict with the AVR headers.
*/
+#if USE_AVR_USART1 || defined(__DOXYGEN__)
SerialDriver SD2;
#endif
-/** @brief Driver default configuration.*/
+/*===========================================================================*/
+/* Driver local variables. */
+/*===========================================================================*/
+
+/**
+ * @brief Driver default configuration.
+ */
static const SerialDriverConfig default_config = {
UBRR(DEFAULT_USART_BITRATE),
(1 << UCSZ1) | (1 << UCSZ0)
};
/*===========================================================================*/
-/* Low Level Driver local functions. */
+/* Driver local functions. */
/*===========================================================================*/
static void set_error(uint8_t sra, SerialDriver *sdp) {
@@ -131,7 +142,7 @@ static void usart1_deinit(void) {
#endif
/*===========================================================================*/
-/* Low Level Driver interrupt handlers. */
+/* Driver interrupt handlers. */
/*===========================================================================*/
#if USE_AVR_USART0 || defined(__DOXYGEN__)
@@ -201,7 +212,7 @@ CH_IRQ_HANDLER(USART1_UDRE_vect) {
#endif /* USE_AVR_USART1 */
/*===========================================================================*/
-/* Low Level Driver exported functions. */
+/* Driver exported functions. */
/*===========================================================================*/
/**