diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-29 12:49:12 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-29 12:49:12 +0000 |
commit | 26790f9fb067095c855498241ababa35ce17e555 (patch) | |
tree | 726d9f0f926ab09a2280c08da75e5a181c223ecb /os/hal/platforms/MSP430 | |
parent | dfd81f5be91be21b8bf7c364bf027531b7ec9946 (diff) | |
download | ChibiOS-26790f9fb067095c855498241ababa35ce17e555.tar.gz ChibiOS-26790f9fb067095c855498241ababa35ce17e555.tar.bz2 ChibiOS-26790f9fb067095c855498241ababa35ce17e555.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1479 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/MSP430')
-rw-r--r-- | os/hal/platforms/MSP430/hal_lld.c | 10 | ||||
-rw-r--r-- | os/hal/platforms/MSP430/hal_lld.h | 4 | ||||
-rw-r--r-- | os/hal/platforms/MSP430/pal_lld.c | 20 | ||||
-rw-r--r-- | os/hal/platforms/MSP430/serial_lld.c | 14 | ||||
-rw-r--r-- | os/hal/platforms/MSP430/serial_lld.h | 30 |
5 files changed, 59 insertions, 19 deletions
diff --git a/os/hal/platforms/MSP430/hal_lld.c b/os/hal/platforms/MSP430/hal_lld.c index 9b878eb36..d511f7f6e 100644 --- a/os/hal/platforms/MSP430/hal_lld.c +++ b/os/hal/platforms/MSP430/hal_lld.c @@ -28,7 +28,7 @@ #include "hal.h"
/*===========================================================================*/
-/* Low Level Driver exported variables. */
+/* Driver exported variables. */
/*===========================================================================*/
/**
@@ -58,19 +58,19 @@ const MSP430DIOConfig pal_default_config = };
/*===========================================================================*/
-/* Low Level Driver local variables. */
+/* Driver local variables. */
/*===========================================================================*/
/*===========================================================================*/
-/* Low Level Driver local functions. */
+/* Driver local functions. */
/*===========================================================================*/
/*===========================================================================*/
-/* Low Level Driver interrupt handlers. */
+/* Driver interrupt handlers. */
/*===========================================================================*/
/*===========================================================================*/
-/* Low Level Driver exported functions. */
+/* Driver exported functions. */
/*===========================================================================*/
/**
diff --git a/os/hal/platforms/MSP430/hal_lld.h b/os/hal/platforms/MSP430/hal_lld.h index 2795a7edc..236ee56c4 100644 --- a/os/hal/platforms/MSP430/hal_lld.h +++ b/os/hal/platforms/MSP430/hal_lld.h @@ -87,6 +87,10 @@ /*===========================================================================*/
/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
+
+/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
diff --git a/os/hal/platforms/MSP430/pal_lld.c b/os/hal/platforms/MSP430/pal_lld.c index fe8acadcd..38806a7f8 100644 --- a/os/hal/platforms/MSP430/pal_lld.c +++ b/os/hal/platforms/MSP430/pal_lld.c @@ -29,6 +29,26 @@ #if CH_HAL_USE_PAL || defined(__DOXYGEN__)
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
+
/**
* @brief MSP430 I/O ports configuration.
*
diff --git a/os/hal/platforms/MSP430/serial_lld.c b/os/hal/platforms/MSP430/serial_lld.c index a69944bf7..caa0e99d0 100644 --- a/os/hal/platforms/MSP430/serial_lld.c +++ b/os/hal/platforms/MSP430/serial_lld.c @@ -31,6 +31,10 @@ #if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
#if USE_MSP430_USART0 || defined(__DOXYGEN__)
/** @brief USART0 serial driver identifier.*/
SerialDriver SD1;
@@ -40,6 +44,10 @@ SerialDriver SD1; SerialDriver SD2;
#endif
+/*===========================================================================*/
+/* Driver local variables. */
+/*===========================================================================*/
+
/** @brief Driver default configuration.*/
static const SerialDriverConfig default_config = {
UBR(DEFAULT_USART_BITRATE),
@@ -48,7 +56,7 @@ static const SerialDriverConfig default_config = { };
/*===========================================================================*/
-/* Low Level Driver local functions. */
+/* Driver local functions. */
/*===========================================================================*/
static void set_error(uint8_t urctl, SerialDriver *sdp) {
@@ -150,7 +158,7 @@ static void usart1_deinit(void) { #endif /* USE_MSP430_USART1 */
/*===========================================================================*/
-/* Low Level Driver interrupt handlers. */
+/* Driver interrupt handlers. */
/*===========================================================================*/
#if USE_MSP430_USART0 || defined(__DOXYGEN__)
@@ -218,7 +226,7 @@ CH_IRQ_HANDLER(USART1RX_VECTOR) { #endif /* USE_MSP430_USART1 */
/*===========================================================================*/
-/* Low Level Driver exported functions. */
+/* Driver exported functions. */
/*===========================================================================*/
/**
diff --git a/os/hal/platforms/MSP430/serial_lld.h b/os/hal/platforms/MSP430/serial_lld.h index e872ee240..fa56d32d8 100644 --- a/os/hal/platforms/MSP430/serial_lld.h +++ b/os/hal/platforms/MSP430/serial_lld.h @@ -30,6 +30,10 @@ #if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
+/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -40,7 +44,7 @@ * @note The default is 32 bytes for both the transmission and receive buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 32
+#define SERIAL_BUFFERS_SIZE 32
#endif
/**
@@ -49,7 +53,7 @@ * this speed.
*/
#if !defined(DEFAULT_USART_BITRATE) || defined(__DOXYGEN__)
-#define DEFAULT_USART_BITRATE 38400
+#define DEFAULT_USART_BITRATE 38400
#endif
/**
@@ -58,7 +62,7 @@ * @note The default is @p TRUE.
*/
#if !defined(USE_MSP430_USART0) || defined(__DOXYGEN__)
-#define USE_MSP430_USART0 TRUE
+#define USE_MSP430_USART0 TRUE
#endif
/**
@@ -67,11 +71,11 @@ * @note The default is @p FALSE.
*/
#if !defined(USE_MSP430_USART1) || defined(__DOXYGEN__)
-#define USE_MSP430_USART1 FALSE
+#define USE_MSP430_USART1 FALSE
#endif
/*===========================================================================*/
-/* Unsupported event flags and custom events. */
+/* Derived constants and error checks. */
/*===========================================================================*/
/*===========================================================================*/
@@ -117,12 +121,6 @@ struct _serial_driver_data { };
/**
- * @brief Macro for baud rate computation.
- * @note Make sure the final baud rate is within tolerance.
- */
-#define UBR(b) (SMCLK / (b))
-
-/**
* @brief MSP430 Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations.
@@ -134,6 +132,16 @@ typedef struct { } SerialDriverConfig;
/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
+
+/**
+ * @brief Macro for baud rate computation.
+ * @note Make sure the final baud rate is within tolerance.
+ */
+#define UBR(b) (SMCLK / (b))
+
+/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
|