aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/MSP430
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-21 14:11:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-21 14:11:12 +0000
commit75792b3d6af243e043e66b1b2f7199229d430ef8 (patch)
tree8c0740a9254d7b4b8d635c6734e3fbd30dc6d30e /os/hal/platforms/MSP430
parent3621ac37b0cbab7737d215db0335017561856a10 (diff)
downloadChibiOS-75792b3d6af243e043e66b1b2f7199229d430ef8.tar.gz
ChibiOS-75792b3d6af243e043e66b1b2f7199229d430ef8.tar.bz2
ChibiOS-75792b3d6af243e043e66b1b2f7199229d430ef8.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1882 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/MSP430')
-rw-r--r--os/hal/platforms/MSP430/serial_lld.c32
-rw-r--r--os/hal/platforms/MSP430/serial_lld.h25
2 files changed, 30 insertions, 27 deletions
diff --git a/os/hal/platforms/MSP430/serial_lld.c b/os/hal/platforms/MSP430/serial_lld.c
index 1dc6399f1..8186813fb 100644
--- a/os/hal/platforms/MSP430/serial_lld.c
+++ b/os/hal/platforms/MSP430/serial_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file MSP430/serial_lld.c
- * @brief MSP430 low level serial driver code.
+ * @file MSP430/serial_lld.c
+ * @brief MSP430 low level serial driver code.
+ *
* @addtogroup MSP430_SERIAL
* @{
*/
@@ -88,9 +89,9 @@ static void notify1(void) {
}
/**
- * @brief USART0 initialization.
+ * @brief USART0 initialization.
*
- * @param[in] config the architecture-dependent serial driver configuration
+ * @param[in] config the architecture-dependent serial driver configuration
*/
static void usart0_init(const SerialConfig *config) {
@@ -110,7 +111,7 @@ static void usart0_init(const SerialConfig *config) {
}
/**
- * @brief USART0 de-initialization.
+ * @brief USART0 de-initialization.
*/
static void usart0_deinit(void) {
@@ -132,9 +133,9 @@ static void notify2(void) {
}
/**
- * @brief USART1 initialization.
+ * @brief USART1 initialization.
*
- * @param[in] config the architecture-dependent serial driver configuration
+ * @param[in] config the architecture-dependent serial driver configuration
*/
static void usart1_init(const SerialConfig *config) {
@@ -154,7 +155,7 @@ static void usart1_init(const SerialConfig *config) {
}
/**
- * @brief USART1 de-initialization.
+ * @brief USART1 de-initialization.
*/
static void usart1_deinit(void) {
@@ -236,7 +237,7 @@ CH_IRQ_HANDLER(USART1RX_VECTOR) {
/*===========================================================================*/
/**
- * Low level serial driver initialization.
+ * @brief Low level serial driver initialization.
*/
void sd_lld_init(void) {
@@ -254,11 +255,14 @@ void sd_lld_init(void) {
}
/**
- * @brief Low level serial driver configuration and (re)start.
+ * @brief Low level serial driver configuration and (re)start.
*
- * @param[in] sdp pointer to a @p SerialDriver object
+ * @param[in] sdp pointer to a @p SerialDriver object
+ * @param[in] config the architecture-dependent serial driver configuration.
+ * If this parameter is set to @p NULL then a default
+ * configuration is used.
*/
-void sd_lld_start(SerialDriver *sdp) {
+void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) {
if (sdp->config == NULL)
sdp->config = &default_config;
@@ -278,11 +282,11 @@ void sd_lld_start(SerialDriver *sdp) {
}
/**
- * @brief Low level serial driver stop.
+ * @brief Low level serial driver stop.
* @details De-initializes the USART, stops the associated clock, resets the
* interrupt vector.
*
- * @param[in] sdp pointer to a @p SerialDriver object
+ * @param[in] sdp pointer to a @p SerialDriver object
*/
void sd_lld_stop(SerialDriver *sdp) {
diff --git a/os/hal/platforms/MSP430/serial_lld.h b/os/hal/platforms/MSP430/serial_lld.h
index ad7ae7dd4..d19c9160d 100644
--- a/os/hal/platforms/MSP430/serial_lld.h
+++ b/os/hal/platforms/MSP430/serial_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file MSP430/serial_lld.h
- * @brief MSP430 low level serial driver header.
+ * @file MSP430/serial_lld.h
+ * @brief MSP430 low level serial driver header.
+ *
* @addtogroup MSP430_SERIAL
* @{
*/
@@ -38,18 +39,18 @@
/*===========================================================================*/
/**
- * @brief USART0 driver enable switch.
+ * @brief USART0 driver enable switch.
* @details If set to @p TRUE the support for USART0 is included.
- * @note The default is @p TRUE.
+ * @note The default is @p TRUE.
*/
#if !defined(USE_MSP430_USART0) || defined(__DOXYGEN__)
#define USE_MSP430_USART0 TRUE
#endif
/**
- * @brief USART1 driver enable switch.
+ * @brief USART1 driver enable switch.
* @details If set to @p TRUE the support for USART1 is included.
- * @note The default is @p FALSE.
+ * @note The default is @p FALSE.
*/
#if !defined(USE_MSP430_USART1) || defined(__DOXYGEN__)
#define USE_MSP430_USART1 TRUE
@@ -64,12 +65,12 @@
/*===========================================================================*/
/**
- * Serial Driver condition flags type.
+ * @brief Serial Driver condition flags type.
*/
typedef uint8_t sdflags_t;
/**
- * @brief MSP430 Serial Driver configuration structure.
+ * @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.
*/
@@ -95,8 +96,6 @@ typedef struct {
_base_asynchronous_channel_data \
/* Driver state.*/ \
sdstate_t state; \
- /* Current configuration data.*/ \
- const SerialConfig *config; \
/* Input queue.*/ \
InputQueue iqueue; \
/* Output queue.*/ \
@@ -116,8 +115,8 @@ typedef struct {
/*===========================================================================*/
/**
- * @brief Macro for baud rate computation.
- * @note Make sure the final baud rate is within tolerance.
+ * @brief Macro for baud rate computation.
+ * @note Make sure the final baud rate is within tolerance.
*/
#define UBR(b) (SMCLK / (b))
@@ -136,7 +135,7 @@ extern SerialDriver SD2;
extern "C" {
#endif
void sd_lld_init(void);
- void sd_lld_start(SerialDriver *sdp);
+ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config);
void sd_lld_stop(SerialDriver *sdp);
#ifdef __cplusplus
}