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/AT91SAM7 | |
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/AT91SAM7')
-rw-r--r-- | os/hal/platforms/AT91SAM7/serial_lld.c | 39 | ||||
-rw-r--r-- | os/hal/platforms/AT91SAM7/serial_lld.h | 27 |
2 files changed, 37 insertions, 29 deletions
diff --git a/os/hal/platforms/AT91SAM7/serial_lld.c b/os/hal/platforms/AT91SAM7/serial_lld.c index c166a697d..4e0e74c23 100644 --- a/os/hal/platforms/AT91SAM7/serial_lld.c +++ b/os/hal/platforms/AT91SAM7/serial_lld.c @@ -18,8 +18,9 @@ */
/**
- * @file AT91SAM7/serial_lld.c
- * @brief AT91SAM7 low level serial driver code.
+ * @file AT91SAM7/serial_lld.c
+ * @brief AT91SAM7 low level serial driver code.
+ *
* @addtogroup AT91SAM7_SERIAL
* @{
*/
@@ -77,9 +78,10 @@ static const SerialConfig default_config = { /*===========================================================================*/
/**
- * @brief USART initialization.
+ * @brief USART initialization.
*
- * @param[in] sdp communication channel associated to the USART
+ * @param[in] sdp communication channel associated to the USART
+ * @param[in] config the architecture-dependent serial driver configuration
*/
static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
AT91PS_USART u = sdp->usart;
@@ -104,8 +106,9 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) { }
/**
- * @brief USART de-initialization.
- * @param[in] u pointer to an USART I/O block
+ * @brief USART de-initialization.
+ *
+ * @param[in] u pointer to an USART I/O block
*/
static void usart_deinit(AT91PS_USART u) {
@@ -118,9 +121,10 @@ static void usart_deinit(AT91PS_USART u) { }
/**
- * @brief Error handling routine.
- * @param[in] err USART CSR register value
- * @param[in] sdp communication channel associated to the USART
+ * @brief Error handling routine.
+ *
+ * @param[in] err USART CSR register value
+ * @param[in] sdp communication channel associated to the USART
*/
static void set_error(SerialDriver *sdp, AT91_REG csr) {
sdflags_t sts = 0;
@@ -142,9 +146,9 @@ static void set_error(SerialDriver *sdp, AT91_REG csr) { __attribute__((noinline))
#endif
/**
- * @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) {
uint32_t csr;
@@ -222,7 +226,7 @@ CH_IRQ_HANDLER(USART1IrqHandler) { /*===========================================================================*/
/**
- * Low level serial driver initialization.
+ * @brief Low level serial driver initialization.
*/
void sd_lld_init(void) {
@@ -250,9 +254,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) {
@@ -281,11 +288,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/AT91SAM7/serial_lld.h b/os/hal/platforms/AT91SAM7/serial_lld.h index 33355ab3d..bb4ed0dde 100644 --- a/os/hal/platforms/AT91SAM7/serial_lld.h +++ b/os/hal/platforms/AT91SAM7/serial_lld.h @@ -18,8 +18,9 @@ */
/**
- * @file AT91SAM7/serial_lld.h
- * @brief AT91SAM7 low level serial driver header.
+ * @file AT91SAM7/serial_lld.h
+ * @brief AT91SAM7 low level serial driver header.
+ *
* @addtogroup AT91SAM7_SERIAL
* @{
*/
@@ -38,32 +39,32 @@ /*===========================================================================*/
/**
- * @brief UART0 driver enable switch.
+ * @brief UART0 driver enable switch.
* @details If set to @p TRUE the support for USART1 is included.
- * @note The default is @p TRUE.
+ * @note The default is @p TRUE.
*/
#if !defined(USE_SAM7_USART0) || defined(__DOXYGEN__)
#define USE_SAM7_USART0 TRUE
#endif
/**
- * @brief UART1 driver enable switch.
+ * @brief UART1 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_SAM7_USART1) || defined(__DOXYGEN__)
#define USE_SAM7_USART1 TRUE
#endif
/**
- * @brief UART1 interrupt priority level setting.
+ * @brief UART1 interrupt priority level setting.
*/
#if !defined(SAM7_USART0_PRIORITY) || defined(__DOXYGEN__)
#define SAM7_USART0_PRIORITY (AT91C_AIC_PRIOR_HIGHEST - 2)
#endif
/**
- * @brief UART2 interrupt priority level setting.
+ * @brief UART2 interrupt priority level setting.
*/
#if !defined(SAM7_USART1_PRIORITY) || defined(__DOXYGEN__)
#define SAM7_USART1_PRIORITY (AT91C_AIC_PRIOR_HIGHEST - 2)
@@ -78,30 +79,30 @@ /*===========================================================================*/
/**
- * @brief Serial Driver condition flags type.
+ * @brief Serial Driver condition flags type.
*/
typedef uint32_t sdflags_t;
/**
- * @brief AT91SAM7 Serial Driver configuration structure.
+ * @brief AT91SAM7 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.
*/
typedef struct {
/**
- * @brief Bit rate.
+ * @brief Bit rate.
* @details This is written to the US_BRGR register of the appropriate AT91S_USART
*/
uint32_t sc_speed;
/**
- * @brief Initialization value for the MR register.
+ * @brief Initialization value for the MR register.
* @details This is written to the US_MR register of the appropriate AT91S_USART
*/
uint32_t sc_mr;
} SerialConfig;
/**
- * @brief @p SerialDriver specific data.
+ * @brief @p SerialDriver specific data.
*/
#define _serial_driver_data \
_base_asynchronous_channel_data \
|