diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-04-20 15:39:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-04-20 15:39:07 +0000 |
commit | 3621ac37b0cbab7737d215db0335017561856a10 (patch) | |
tree | b40e3244e794f2dc706b71ff8bff44e1b0fdf0ad /os/hal/platforms/STM32 | |
parent | d49704990da043573942c0a35de92fc89d62d525 (diff) | |
download | ChibiOS-3621ac37b0cbab7737d215db0335017561856a10.tar.gz ChibiOS-3621ac37b0cbab7737d215db0335017561856a10.tar.bz2 ChibiOS-3621ac37b0cbab7737d215db0335017561856a10.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1881 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r-- | os/hal/platforms/STM32/serial_lld.c | 35 | ||||
-rw-r--r-- | os/hal/platforms/STM32/serial_lld.h | 48 |
2 files changed, 44 insertions, 39 deletions
diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c index 00ccadd6b..fe9baea3d 100644 --- a/os/hal/platforms/STM32/serial_lld.c +++ b/os/hal/platforms/STM32/serial_lld.c @@ -18,8 +18,9 @@ */
/**
- * @file STM32/serial_lld.c
- * @brief STM32 low level serial driver code.
+ * @file STM32/serial_lld.c
+ * @brief STM32 low level serial driver code.
+ *
* @addtogroup STM32_SERIAL
* @{
*/
@@ -78,10 +79,11 @@ static const SerialConfig default_config = /*===========================================================================*/
/**
- * @brief USART initialization.
+ * @brief USART initialization.
* @details This function must be invoked with interrupts disabled.
*
- * @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
*/
static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
USART_TypeDef *u = sdp->usart;
@@ -107,10 +109,10 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) { }
/**
- * @brief USART de-initialization.
+ * @brief USART de-initialization.
* @details This function must be invoked with interrupts disabled.
*
- * @param[in] u pointer to an USART I/O block
+ * @param[in] u pointer to an USART I/O block
*/
static void usart_deinit(USART_TypeDef *u) {
@@ -122,8 +124,8 @@ static void usart_deinit(USART_TypeDef *u) { /**
* @brief Error handling routine.
*
- * @param[in] sdp pointer to a @p SerialDriver object
- * @param[in] sr USART SR register value
+ * @param[in] sdp pointer to a @p SerialDriver object
+ * @param[in] sr USART SR register value
*/
static void set_error(SerialDriver *sdp, uint16_t sr) {
sdflags_t sts = 0;
@@ -144,9 +146,9 @@ static void set_error(SerialDriver *sdp, uint16_t sr) { }
/**
- * @brief Common IRQ handler.
+ * @brief Common IRQ handler.
*
- * @param[in] sdp communication channel associated to the USART
+ * @param[in] sdp communication channel associated to the USART
*/
static void serve_interrupt(SerialDriver *sdp) {
USART_TypeDef *u = sdp->usart;
@@ -281,7 +283,7 @@ CH_IRQ_HANDLER(Vector114) { /*===========================================================================*/
/**
- * Low level serial driver initialization.
+ * @brief Low level serial driver initialization.
*/
void sd_lld_init(void) {
@@ -314,9 +316,12 @@ 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, const SerialConfig *config) {
@@ -366,11 +371,11 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) { }
/**
- * @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/STM32/serial_lld.h b/os/hal/platforms/STM32/serial_lld.h index 979009916..3df8b7e70 100644 --- a/os/hal/platforms/STM32/serial_lld.h +++ b/os/hal/platforms/STM32/serial_lld.h @@ -18,8 +18,9 @@ */
/**
- * @file STM32/serial_lld.h
- * @brief STM32 low level serial driver header.
+ * @file STM32/serial_lld.h
+ * @brief STM32 low level serial driver header.
+ *
* @addtogroup STM32_SERIAL
* @{
*/
@@ -38,27 +39,27 @@ /*===========================================================================*/
/**
- * @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_STM32_USART1) || defined(__DOXYGEN__)
#define USE_STM32_USART1 TRUE
#endif
/**
- * @brief USART2 driver enable switch.
+ * @brief USART2 driver enable switch.
* @details If set to @p TRUE the support for USART2 is included.
- * @note The default is @p TRUE.
+ * @note The default is @p TRUE.
*/
#if !defined(USE_STM32_USART2) || defined(__DOXYGEN__)
#define USE_STM32_USART2 TRUE
#endif
/**
- * @brief USART3 driver enable switch.
+ * @brief USART3 driver enable switch.
* @details If set to @p TRUE the support for USART3 is included.
- * @note The default is @p FALSE.
+ * @note The default is @p FALSE.
*/
#if !defined(USE_STM32_USART3) || defined(__DOXYGEN__)
#define USE_STM32_USART3 TRUE
@@ -67,18 +68,18 @@ #if defined(STM32F10X_HD) || defined(STM32F10X_CL) || defined(__DOXYGEN__)
/**
- * @brief UART4 driver enable switch.
+ * @brief UART4 driver enable switch.
* @details If set to @p TRUE the support for UART4 is included.
- * @note The default is @p FALSE.
+ * @note The default is @p FALSE.
*/
#if !defined(USE_STM32_UART4) || defined(__DOXYGEN__)
#define USE_STM32_UART4 TRUE
#endif
/**
- * @brief UART5 driver enable switch.
+ * @brief UART5 driver enable switch.
* @details If set to @p TRUE the support for UART5 is included.
- * @note The default is @p FALSE.
+ * @note The default is @p FALSE.
*/
#if !defined(USE_STM32_USART3) || defined(__DOXYGEN__)
#define USE_STM32_UART5 TRUE
@@ -86,21 +87,21 @@ #endif
/**
- * @brief USART1 interrupt priority level setting.
+ * @brief USART1 interrupt priority level setting.
*/
#if !defined(STM32_USART1_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART1_PRIORITY 12
#endif
/**
- * @brief USART2 interrupt priority level setting.
+ * @brief USART2 interrupt priority level setting.
*/
#if !defined(STM32_USART2_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART2_PRIORITY 12)
#endif
/**
- * @brief USART3 interrupt priority level setting.
+ * @brief USART3 interrupt priority level setting.
*/
#if !defined(STM32_USART3_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART3_PRIORITY 12
@@ -108,14 +109,14 @@ #if defined(STM32F10X_HD) || defined(STM32F10X_CL) || defined(__DOXYGEN__)
/**
- * @brief UART4 interrupt priority level setting.
+ * @brief UART4 interrupt priority level setting.
*/
#if !defined(STM32_UART4_PRIORITY) || defined(__DOXYGEN__)
#define STM32_UART4_PRIORITY 12
#endif
/**
- * @brief UART5 interrupt priority level setting.
+ * @brief UART5 interrupt priority level setting.
*/
#if !defined(STM32_UART5_PRIORITY) || defined(__DOXYGEN__)
#define STM32_UART5_PRIORITY 12
@@ -131,18 +132,17 @@ /*===========================================================================*/
/**
- * @brief Serial Driver condition flags type.
+ * @brief Serial Driver condition flags type.
*/
typedef uint32_t sdflags_t;
/**
- * @brief STM32 Serial Driver configuration structure.
+ * @brief STM32 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.
- *
- * @note This structure content is architecture dependent, each driver
- * implementation defines its own version and the custom static
- * initializers.
+ * @note This structure content is architecture dependent, each driver
+ * implementation defines its own version and the custom static
+ * initializers.
*/
typedef struct {
/**
@@ -164,7 +164,7 @@ typedef struct { } SerialConfig;
/**
- * @brief @p SerialDriver specific data.
+ * @brief @p SerialDriver specific data.
*/
#define _serial_driver_data \
_base_asynchronous_channel_data \
|