aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/adc_lld.c23
-rw-r--r--os/hal/templates/adc_lld.h24
-rw-r--r--os/hal/templates/can_lld.c45
-rw-r--r--os/hal/templates/can_lld.h53
-rw-r--r--os/hal/templates/hal_lld.c7
-rw-r--r--os/hal/templates/hal_lld.h5
-rw-r--r--os/hal/templates/halconf.h28
-rw-r--r--os/hal/templates/mac_lld.c91
-rw-r--r--os/hal/templates/mac_lld.h17
-rw-r--r--os/hal/templates/pal_lld.c5
-rw-r--r--os/hal/templates/pal_lld.h297
-rw-r--r--os/hal/templates/pwm_lld.c32
-rw-r--r--os/hal/templates/pwm_lld.h17
-rw-r--r--os/hal/templates/serial_lld.c19
-rw-r--r--os/hal/templates/serial_lld.h16
-rw-r--r--os/hal/templates/spi_lld.c38
-rw-r--r--os/hal/templates/spi_lld.h9
17 files changed, 365 insertions, 361 deletions
diff --git a/os/hal/templates/adc_lld.c b/os/hal/templates/adc_lld.c
index 3e6740c12..b0b6d4451 100644
--- a/os/hal/templates/adc_lld.c
+++ b/os/hal/templates/adc_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/adc_lld.c
- * @brief ADC Driver subsystem low level driver source template.
+ * @file templates/adc_lld.c
+ * @brief ADC Driver subsystem low level driver source template.
+ *
* @addtogroup ADC_LLD
* @{
*/
@@ -50,16 +51,16 @@
/*===========================================================================*/
/**
- * @brief Low level ADC driver initialization.
+ * @brief Low level ADC driver initialization.
*/
void adc_lld_init(void) {
}
/**
- * @brief Configures and activates the ADC peripheral.
+ * @brief Configures and activates the ADC peripheral.
*
- * @param[in] adcp pointer to the @p ADCDriver object
+ * @param[in] adcp pointer to the @p ADCDriver object
*/
void adc_lld_start(ADCDriver *adcp) {
@@ -70,27 +71,27 @@ void adc_lld_start(ADCDriver *adcp) {
}
/**
- * @brief Deactivates the ADC peripheral.
+ * @brief Deactivates the ADC peripheral.
*
- * @param[in] adcp pointer to the @p ADCDriver object
+ * @param[in] adcp pointer to the @p ADCDriver object
*/
void adc_lld_stop(ADCDriver *adcp) {
}
/**
- * @brief Starts an ADC conversion.
+ * @brief Starts an ADC conversion.
*
- * @param[in] adcp pointer to the @p ADCDriver object
+ * @param[in] adcp pointer to the @p ADCDriver object
*/
void adc_lld_start_conversion(ADCDriver *adcp) {
}
/**
- * @brief Stops an ongoing conversion.
+ * @brief Stops an ongoing conversion.
*
- * @param[in] adcp pointer to the @p ADCDriver object
+ * @param[in] adcp pointer to the @p ADCDriver object
*/
void adc_lld_stop_conversion(ADCDriver *adcp) {
diff --git a/os/hal/templates/adc_lld.h b/os/hal/templates/adc_lld.h
index 2a9eca699..e4ed953b9 100644
--- a/os/hal/templates/adc_lld.h
+++ b/os/hal/templates/adc_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/adc_lld.h
- * @brief ADC Driver subsystem low level driver header template.
+ * @file templates/adc_lld.h
+ * @brief ADC Driver subsystem low level driver header template.
+ *
* @addtogroup ADC_LLD
* @{
*/
@@ -50,24 +51,25 @@
/*===========================================================================*/
/**
- * @brief ADC sample data type.
+ * @brief ADC sample data type.
*/
typedef uint16_t adcsample_t;
/**
- * @brief Channels number in a conversion group.
+ * @brief Channels number in a conversion group.
*/
typedef uint16_t adc_channels_num_t;
/**
- * @brief ADC notification callback type.
- * @param[in] buffer pointer to the most recent samples data
- * @param[in] n number of buffer rows available starting from @p buffer
+ * @brief ADC notification callback type.
+ *
+ * @param[in] buffer pointer to the most recent samples data
+ * @param[in] n number of buffer rows available starting from @p buffer
*/
typedef void (*adccallback_t)(adcsample_t *buffer, size_t n);
/**
- * @brief Conversion group configuration structure.
+ * @brief Conversion group configuration structure.
* @details This implementation-dependent structure describes a conversion
* operation.
*/
@@ -84,15 +86,15 @@ typedef struct {
} ADCConversionGroup;
/**
- * @brief Driver configuration structure.
- * @note It could be empty on some architectures.
+ * @brief Driver configuration structure.
+ * @note It could be empty on some architectures.
*/
typedef struct {
} ADCConfig;
/**
- * @brief Structure representing an ADC driver.
+ * @brief Structure representing an ADC driver.
*/
typedef struct {
/**
diff --git a/os/hal/templates/can_lld.c b/os/hal/templates/can_lld.c
index f1945c350..3d3897e3d 100644
--- a/os/hal/templates/can_lld.c
+++ b/os/hal/templates/can_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/can_lld.c
- * @brief CAN Driver subsystem low level driver source template.
+ * @file templates/can_lld.c
+ * @brief CAN Driver subsystem low level driver source template.
+ *
* @addtogroup CAN_LLD
* @{
*/
@@ -50,25 +51,25 @@
/*===========================================================================*/
/**
- * @brief Low level CAN driver initialization.
+ * @brief Low level CAN driver initialization.
*/
void can_lld_init(void) {
}
/**
- * @brief Configures and activates the CAN peripheral.
+ * @brief Configures and activates the CAN peripheral.
*
- * @param[in] canp pointer to the @p CANDriver object
+ * @param[in] canp pointer to the @p CANDriver object
*/
void can_lld_start(CANDriver *canp) {
}
/**
- * @brief Deactivates the CAN peripheral.
+ * @brief Deactivates the CAN peripheral.
*
- * @param[in] canp pointer to the @p CANDriver object
+ * @param[in] canp pointer to the @p CANDriver object
*/
void can_lld_stop(CANDriver *canp) {
@@ -80,13 +81,12 @@ void can_lld_stop(CANDriver *canp) {
/**
- * @brief Determines whether a frame can be transmitted.
+ * @brief Determines whether a frame can be transmitted.
*
- * @param[in] canp pointer to the @p CANDriver object
- *
- * @return The queue space availability.
- * @retval FALSE no space in the transmit queue.
- * @retval TRUE transmit slot available.
+ * @param[in] canp pointer to the @p CANDriver object
+ * @return The queue space availability.
+ * @retval FALSE no space in the transmit queue.
+ * @retval TRUE transmit slot available.
*/
bool_t can_lld_can_transmit(CANDriver *canp) {
@@ -94,7 +94,7 @@ bool_t can_lld_can_transmit(CANDriver *canp) {
}
/**
- * @brief Inserts a frame into the transmit queue.
+ * @brief Inserts a frame into the transmit queue.
*
* @param[in] canp pointer to the @p CANDriver object
* @param[in] ctfp pointer to the CAN frame to be transmitted
@@ -104,13 +104,12 @@ void can_lld_transmit(CANDriver *canp, const CANTxFrame *ctfp) {
}
/**
- * @brief Determines whether a frame has been received.
- *
- * @param[in] canp pointer to the @p CANDriver object
+ * @brief Determines whether a frame has been received.
*
- * @return The queue space availability.
- * @retval FALSE no space in the transmit queue.
- * @retval TRUE transmit slot available.
+ * @param[in] canp pointer to the @p CANDriver object
+ * @return The queue space availability.
+ * @retval FALSE no space in the transmit queue.
+ * @retval TRUE transmit slot available.
*/
bool_t can_lld_can_receive(CANDriver *canp) {
@@ -118,7 +117,7 @@ bool_t can_lld_can_receive(CANDriver *canp) {
}
/**
- * @brief Receives a frame from the input queue.
+ * @brief Receives a frame from the input queue.
*
* @param[in] canp pointer to the @p CANDriver object
* @param[out] crfp pointer to the buffer where the CAN frame is copied
@@ -129,7 +128,7 @@ void can_lld_receive(CANDriver *canp, CANRxFrame *crfp) {
#if CAN_USE_SLEEP_MODE || defined(__DOXYGEN__)
/**
- * @brief Enters the sleep mode.
+ * @brief Enters the sleep mode.
*
* @param[in] canp pointer to the @p CANDriver object
*/
@@ -138,7 +137,7 @@ void can_lld_sleep(CANDriver *canp) {
}
/**
- * @brief Enforces leaving the sleep mode.
+ * @brief Enforces leaving the sleep mode.
*
* @param[in] canp pointer to the @p CANDriver object
*/
diff --git a/os/hal/templates/can_lld.h b/os/hal/templates/can_lld.h
index 6e55eb2c6..3543e039d 100644
--- a/os/hal/templates/can_lld.h
+++ b/os/hal/templates/can_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/can_lld.h
- * @brief CAN Driver subsystem low level driver header template.
+ * @file templates/can_lld.h
+ * @brief CAN Driver subsystem low level driver header template.
+ *
* @addtogroup CAN_LLD
* @{
*/
@@ -34,8 +35,8 @@
/*===========================================================================*/
/**
- * @brief This switch defines whether the driver implementation supports
- * a low power switch mode with automatic an wakeup feature.
+ * @brief This switch defines whether the driver implementation supports
+ * a low power switch mode with automatic an wakeup feature.
*/
#define CAN_SUPPORTS_SLEEP TRUE
@@ -44,9 +45,9 @@
/*===========================================================================*/
/**
- * @brief Sleep mode related APIs inclusion switch.
- * @note This switch is enforced to @p FALSE if the driver implementation
- * does not support the sleep mode.
+ * @brief Sleep mode related APIs inclusion switch.
+ * @note This switch is enforced to @p FALSE if the driver implementation
+ * does not support the sleep mode.
*/
#if CAN_SUPPORTS_SLEEP || defined(__DOXYGEN__)
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
@@ -69,14 +70,15 @@
/*===========================================================================*/
/**
- * @brief CAN status flags.
+ * @brief CAN status flags.
*/
typedef uint32_t canstatus_t;
/**
- * @brief CAN transmission frame.
- * @note Accessing the frame data as word16 or word32 is not portable because
- * machine data endianness, it can be still useful for a quick filling.
+ * @brief CAN transmission frame.
+ * @note Accessing the frame data as word16 or word32 is not portable
+ * because machine data endianness, it can be still useful for a
+ * quick filling.
*/
typedef struct {
struct {
@@ -100,9 +102,10 @@ typedef struct {
} CANTxFrame;
/**
- * @brief CAN received frame.
- * @note Accessing the frame data as word16 or word32 is not portable because
- * machine data endianness, it can be still useful for a quick filling.
+ * @brief CAN received frame.
+ * @note Accessing the frame data as word16 or word32 is not portable
+ * because machine data endianness, it can be still useful for a
+ * quick filling.
*/
typedef struct {
struct {
@@ -126,21 +129,21 @@ typedef struct {
} CANRxFrame;
/**
- * @brief CAN filter.
- * @note It could not be present on some architectures.
+ * @brief CAN filter.
+ * @note It could not be present on some architectures.
*/
typedef struct {
} CANFilter;
/**
- * @brief Driver configuration structure.
- * @note It could be empty on some architectures.
+ * @brief Driver configuration structure.
+ * @note It could be empty on some architectures.
*/
typedef struct {
} CANConfig;
/**
- * @brief Structure representing an CAN driver.
+ * @brief Structure representing an CAN driver.
*/
typedef struct {
/**
@@ -161,12 +164,12 @@ typedef struct {
Semaphore cd_rxsem;
/**
* @brief One or more frames become available.
- * @note After broadcasting this event it will not be broadcasted again
- * until the received frames queue has been completely emptied. It
- * is <b>not</b> broadcasted for each received frame. It is
- * responsibility of the application to empty the queue by repeatedly
- * invoking @p chReceive() when listening to this event. This behavior
- * minimizes the interrupt served by the system because CAN traffic.
+ * @note After broadcasting this event it will not be broadcasted again
+ * until the received frames queue has been completely emptied. It
+ * is <b>not</b> broadcasted for each received frame. It is
+ * responsibility of the application to empty the queue by repeatedly
+ * invoking @p chReceive() when listening to this event. This behavior
+ * minimizes the interrupt served by the system because CAN traffic.
*/
EventSource cd_rxfull_event;
/**
diff --git a/os/hal/templates/hal_lld.c b/os/hal/templates/hal_lld.c
index 75e58d988..56dc1b88e 100644
--- a/os/hal/templates/hal_lld.c
+++ b/os/hal/templates/hal_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/hal_lld.c
- * @brief HAL Driver subsystem low level driver source template.
+ * @file templates/hal_lld.c
+ * @brief HAL Driver subsystem low level driver source template.
+ *
* @addtogroup HAL_LLD
* @{
*/
@@ -48,7 +49,7 @@
/*===========================================================================*/
/**
- * @brief Low level HAL driver initialization.
+ * @brief Low level HAL driver initialization.
*/
void hal_lld_init(void) {
diff --git a/os/hal/templates/hal_lld.h b/os/hal/templates/hal_lld.h
index ee23d19df..c9734d5b5 100644
--- a/os/hal/templates/hal_lld.h
+++ b/os/hal/templates/hal_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/hal_lld.h
- * @brief HAL subsystem low level driver header template.
+ * @file templates/hal_lld.h
+ * @brief HAL subsystem low level driver header template.
+ *
* @addtogroup HAL_LLD
* @{
*/
diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h
index 628501219..dae0c2c76 100644
--- a/os/hal/templates/halconf.h
+++ b/os/hal/templates/halconf.h
@@ -18,16 +18,18 @@
*/
/**
- * @file templates/halconf.h
- * @brief HAL configuration header.
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
* @addtogroup HAL_CONF
* @{
*/
/*
- * HAL configuration file, this file allows to enable or disable the various
- * device drivers from your application. You may also use this file in order
- * to override the device drivers default settings.
+ *
*/
#ifndef _HALCONF_H_
@@ -45,7 +47,7 @@
/*===========================================================================*/
/**
- * @brief Enables the PAL subsystem.
+ * @brief Enables the PAL subsystem.
*/
#if !defined(CH_HAL_USE_PAL) || defined(__DOXYGEN__)
#define CH_HAL_USE_PAL TRUE
@@ -56,7 +58,7 @@
/*===========================================================================*/
/**
- * @brief Enables the ADC subsystem.
+ * @brief Enables the ADC subsystem.
*/
#if !defined(CH_HAL_USE_ADC) || defined(__DOXYGEN__)
#define CH_HAL_USE_ADC TRUE
@@ -67,7 +69,7 @@
/*===========================================================================*/
/**
- * @brief Enables the CAN subsystem.
+ * @brief Enables the CAN subsystem.
*/
#if !defined(CH_HAL_USE_CAN) || defined(__DOXYGEN__)
#define CH_HAL_USE_CAN TRUE
@@ -83,7 +85,7 @@
/*===========================================================================*/
/**
- * @brief Enables the MAC subsystem.
+ * @brief Enables the MAC subsystem.
*/
#if !defined(CH_HAL_USE_MAC) || defined(__DOXYGEN__)
#define CH_HAL_USE_MAC TRUE
@@ -94,7 +96,7 @@
/*===========================================================================*/
/**
- * @brief Enables the PWM subsystem.
+ * @brief Enables the PWM subsystem.
*/
#if !defined(CH_HAL_USE_PWM) || defined(__DOXYGEN__)
#define CH_HAL_USE_PWM TRUE
@@ -105,7 +107,7 @@
/*===========================================================================*/
/**
- * @brief Enables the SERIAL subsystem.
+ * @brief Enables the SERIAL subsystem.
*/
#if !defined(CH_HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define CH_HAL_USE_SERIAL TRUE
@@ -122,7 +124,7 @@
/*===========================================================================*/
/**
- * @brief Enables the SPI subsystem.
+ * @brief Enables the SPI subsystem.
*/
#if !defined(CH_HAL_USE_SPI) || defined(__DOXYGEN__)
#define CH_HAL_USE_SPI TRUE
@@ -138,7 +140,7 @@
/*===========================================================================*/
/**
- * @brief Enables the MMC_SPI subsystem.
+ * @brief Enables the MMC_SPI subsystem.
*/
#if !defined(CH_HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define CH_HAL_USE_MMC_SPI TRUE
diff --git a/os/hal/templates/mac_lld.c b/os/hal/templates/mac_lld.c
index d65365fd5..b71d11330 100644
--- a/os/hal/templates/mac_lld.c
+++ b/os/hal/templates/mac_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/mac_lld.c
- * @brief MAC Driver subsystem low level driver source template.
+ * @file templates/mac_lld.c
+ * @brief MAC Driver subsystem low level driver source template.
+ *
* @addtogroup MAC_LLD
* @{
*/
@@ -50,34 +51,34 @@
/*===========================================================================*/
/**
- * @brief Low level MAC initialization.
+ * @brief Low level MAC initialization.
*/
void mac_lld_init(void) {
}
/**
- * @brief Low level MAC address setup.
+ * @brief Low level MAC address setup.
*
- * @param[in] macp pointer to the @p MACDriver object
- * @param[in] p pointer to a six bytes buffer containing the MAC address. If
- * this parameter is set to @p NULL then a system default MAC is
- * used.
+ * @param[in] macp pointer to the @p MACDriver object
+ * @param[in] p pointer to a six bytes buffer containing the MAC
+ * address. If this parameter is set to @p NULL then
+ * a system default MAC is used.
*/
void mac_lld_set_address(MACDriver *macp, const uint8_t *p) {
}
/**
- * @brief Returns a transmission descriptor.
+ * @brief Returns a transmission descriptor.
* @details One of the available transmission descriptors is locked and
* returned.
*
- * @param[in] macp pointer to the @p MACDriver object
- * @param[out] tdp pointer to a @p MACTransmitDescriptor structure
- * @return The operation status.
- * @retval RDY_OK the descriptor was obtained.
- * @retval RDY_TIMEOUT descriptor not available.
+ * @param[in] macp pointer to the @p MACDriver object
+ * @param[out] tdp pointer to a @p MACTransmitDescriptor structure
+ * @return The operation status.
+ * @retval RDY_OK a descriptor was obtained.
+ * @retval RDY_TIMEOUT descriptor not available.
*/
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
MACTransmitDescriptor *tdp) {
@@ -86,14 +87,16 @@ msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
}
/**
- * @brief Writes to a transmit descriptor's stream.
+ * @brief Writes to a transmit descriptor's stream.
*
- * @param[in] tdp pointer to a @p MACTransmitDescriptor structure
- * @param[in] buf pointer to the buffer cointaining the data to be written
- * @param[in] size number of bytes to be written
- * @return The number of bytes written into the descriptor's stream, this
- * value can be less than the amount specified in the parameter
- * @p size if the maximum frame size is reached.
+ * @param[in] tdp pointer to a @p MACTransmitDescriptor structure
+ * @param[in] buf pointer to the buffer containing the data to be
+ * written
+ * @param[in] size number of bytes to be written
+ * @return The number of bytes written into the descriptor's
+ * stream, this value can be less than the amount
+ * specified in the parameter @p size if the maximum
+ * frame size is reached.
*/
size_t mac_lld_write_transmit_descriptor(MACTransmitDescriptor *tdp,
uint8_t *buf,
@@ -103,23 +106,23 @@ size_t mac_lld_write_transmit_descriptor(MACTransmitDescriptor *tdp,
}
/**
- * @brief Releases a transmit descriptor and starts the transmission of the
- * enqueued data as a single frame.
+ * @brief Releases a transmit descriptor and starts the transmission of the
+ * enqueued data as a single frame.
*
- * @param[in] tdp the pointer to the @p MACTransmitDescriptor structure
+ * @param[in] tdp pointer to a @p MACTransmitDescriptor structure
*/
void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
}
/**
- * @brief Returns a receive descriptor.
+ * @brief Returns a receive descriptor.
*
- * @param[in] macp pointer to the @p MACDriver object
- * @param[out] rdp pointer to a @p MACReceiveDescriptor structure
- * @return The operation status.
- * @retval RDY_OK the descriptor was obtained.
- * @retval RDY_TIMEOUT descriptor not available.
+ * @param[in] macp pointer to a @p MACDriver object
+ * @param[out] rdp pointer to a @p MACReceiveDescriptor structure
+ * @return The operation status.
+ * @retval RDY_OK a descriptor was obtained.
+ * @retval RDY_TIMEOUT descriptor not available.
*/
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
MACReceiveDescriptor *rdp) {
@@ -128,14 +131,14 @@ msg_t max_lld_get_receive_descriptor(MACDriver *macp,
}
/**
- * @brief Reads from a receive descriptor's stream.
+ * @brief Reads from a receive descriptor's stream.
*
- * @param[in] rdp pointer to a @p MACReceiveDescriptor structure
- * @param[in] buf pointer to the buffer that will receive the read data
- * @param[in] size number of bytes to be read
- * @return The number of bytes read from the descriptor's stream, this
- * value can be less than the amount specified in the parameter
- * @p size if there are no more bytes to read.
+ * @param[in] rdp pointer to a @p MACReceiveDescriptor structure
+ * @param[in] buf pointer to a buffer that will receive the read data
+ * @param[in] size number of bytes to be read
+ * @return The number of bytes read from the descriptor's stream,
+ * this value can be less than the amount specified in
+ * the parameter @p size if there are no more bytes to read.
*/
size_t mac_lld_read_receive_descriptor(MACReceiveDescriptor *rdp,
uint8_t *buf,
@@ -145,23 +148,23 @@ size_t mac_lld_read_receive_descriptor(MACReceiveDescriptor *rdp,
}
/**
- * @brief Releases a receive descriptor.
+ * @brief Releases a receive descriptor.
* @details The descriptor and its buffer are made available for more incoming
* frames.
*
- * @param[in] rdp the pointer to the @p MACReceiveDescriptor structure
+ * @param[in] rdp pointer to a @p MACReceiveDescriptor structure
*/
void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp) {
}
/**
- * @brief Updates and returns the link status.
+ * @brief Updates and returns the link status.
*
- * @param[in] macp pointer to the @p MACDriver object
- * @return The link status.
- * @retval TRUE if the link is active.
- * @retval FALSE if the link is down.
+ * @param[in] macp pointer to a @p MACDriver object
+ * @return The link status.
+ * @retval TRUE if the link is active.
+ * @retval FALSE if the link is down.
*/
bool_t mac_lld_poll_link_status(MACDriver *macp) {
diff --git a/os/hal/templates/mac_lld.h b/os/hal/templates/mac_lld.h
index 1fda8b8da..05d943084 100644
--- a/os/hal/templates/mac_lld.h
+++ b/os/hal/templates/mac_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/mac_lld.h
- * @brief MAC Driver subsystem low level driver header template.
+ * @file templates/mac_lld.h
+ * @brief MAC Driver subsystem low level driver header template.
+ *
* @addtogroup MAC_LLD
* @{
*/
@@ -38,21 +39,21 @@
/*===========================================================================*/
/**
- * @brief Number of available transmit buffers.
+ * @brief Number of available transmit buffers.
*/
#if !defined(MAC_TRANSMIT_BUFFERS) || defined(__DOXYGEN__)
#define MAC_TRANSMIT_BUFFERS 2
#endif
/**
- * @brief Number of available receive buffers.
+ * @brief Number of available receive buffers.
*/
#if !defined(MAC_RECEIVE_BUFFERS) || defined(__DOXYGEN__)
#define MAC_RECEIVE_BUFFERS 2
#endif
/**
- * @brief Maximum supported frame size.
+ * @brief Maximum supported frame size.
*/
#if !defined(MAC_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define MAC_BUFFERS_SIZE 1518
@@ -67,7 +68,7 @@
/*===========================================================================*/
/**
- * @brief Structure representing a MAC driver.
+ * @brief Structure representing a MAC driver.
*/
typedef struct {
Semaphore md_tdsem; /**< Transmit semaphore. */
@@ -79,7 +80,7 @@ typedef struct {
} MACDriver;
/**
- * @brief Structure representing a transmit descriptor.
+ * @brief Structure representing a transmit descriptor.
*/
typedef struct {
size_t td_offset; /**< Current write offset. */
@@ -88,7 +89,7 @@ typedef struct {
} MACTransmitDescriptor;
/**
- * @brief Structure representing a receive descriptor.
+ * @brief Structure representing a receive descriptor.
*/
typedef struct {
size_t rd_offset; /**< Current read offset. */
diff --git a/os/hal/templates/pal_lld.c b/os/hal/templates/pal_lld.c
index 3a0747f8d..3b5f597d0 100644
--- a/os/hal/templates/pal_lld.c
+++ b/os/hal/templates/pal_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/pal_lld.c
- * @brief PAL subsystem low level driver template.
+ * @file templates/pal_lld.c
+ * @brief PAL subsystem low level driver template.
+ *
* @addtogroup PAL_LLD
* @{
*/
diff --git a/os/hal/templates/pal_lld.h b/os/hal/templates/pal_lld.h
index c19aab1de..8b8dd9202 100644
--- a/os/hal/templates/pal_lld.h
+++ b/os/hal/templates/pal_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/pal_lld.h
- * @brief PAL subsystem low level driver header template.
+ * @file templates/pal_lld.h
+ * @brief PAL subsystem low level driver header template.
+ *
* @addtogroup PAL_LLD
* @{
*/
@@ -38,42 +39,42 @@
/*===========================================================================*/
/**
- * @brief Generic I/O ports static initializer.
+ * @brief Generic I/O ports static initializer.
* @details An instance of this structure must be passed to @p palInit() at
* system startup time in order to initialized the digital I/O
* subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time.
- *
- * @note This structure content is architecture dependent. The nome should be
- * changed to include the architecture name following this pattern:<br>
- * - [ARCH][CELL]Config.
- * .
- * As example:<br>
- * - MSP430DIOConfig.
- * .
+ * @note This structure content is architecture dependent. The nome should
+ * be changed to include the architecture name following this
+ * pattern:<br>
+ * - [ARCH][CELL]Config.
+ * .
+ * As example:<br>
+ * - MSP430DIOConfig.
+ * .
*/
typedef struct {
} GenericConfig;
/**
- * @brief Width, in bits, of an I/O port.
+ * @brief Width, in bits, of an I/O port.
*/
#define PAL_IOPORTS_WIDTH 32
/**
- * @brief Whole port mask.
- * @brief This macro specifies all the valid bits into a port.
+ * @brief Whole port mask.
+ * @brief This macro specifies all the valid bits into a port.
*/
#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
/**
- * @brief Digital I/O port sized unsigned type.
+ * @brief Digital I/O port sized unsigned type.
*/
typedef uint32_t ioportmask_t;
/**
- * @brief Port Identifier.
+ * @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make
* any assumption about it, use the provided macros when populating
* variables of this type.
@@ -85,7 +86,7 @@ typedef uint32_t ioportid_t;
/*===========================================================================*/
/**
- * @brief First I/O port identifier.
+ * @brief First I/O port identifier.
* @details Low level drivers can define multiple ports, it is suggested to
* use this naming convention.
*/
@@ -97,225 +98,211 @@ typedef uint32_t ioportid_t;
/*===========================================================================*/
/**
- * @brief Low level PAL subsystem initialization.
+ * @brief Low level PAL subsystem initialization.
*
- * @param[in] config the architecture-dependent ports configuration
+ * @param[in] config architecture-dependent ports configuration
*/
#define pal_lld_init(config)
/**
- * @brief Reads the physical I/O port states.
- *
- * @param[in] port the port identifier
- * @return The port bits.
+ * @brief Reads the physical I/O port states.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
+ * @param[in] port port identifier
+ * @return The port bits.
*/
#define pal_lld_readport(port)
/**
- * @brief Reads the output latch.
+ * @brief Reads the output latch.
* @details The purpose of this function is to read back the latched output
* value.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
*
- * @param[in] port the port identifier
- * @return The latched logical states.
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
+ * @param[in] port port identifier
+ * @return The latched logical states.
*/
#define pal_lld_readlatch(port)
/**
- * @brief Writes a bits mask on a I/O port.
- *
- * @param[in] port the port identifier
- * @param[in] bits the bits to be written on the specified port
+ * @brief Writes a bits mask on a I/O port.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
+ * @param[in] port port identifier
+ * @param[in] bits bits to be written on the specified port
*/
#define pal_lld_writeport(port, bits)
/**
- * @brief Sets a bits mask on a I/O port.
+ * @brief Sets a bits mask on a I/O port.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] bits the bits to be ORed on the specified port
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] bits bits to be ORed on the specified port
*/
#define pal_lld_setport(port, bits)
/**
- * @brief Clears a bits mask on a I/O port.
- *
- * @param[in] port the port identifier
- * @param[in] bits the bits to be cleared on the specified port
+ * @brief Clears a bits mask on a I/O port.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] bits bits to be cleared on the specified port
*/
#define pal_lld_clearport(port, bits)
/**
- * @brief Toggles a bits mask on a I/O port.
+ * @brief Toggles a bits mask on a I/O port.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] bits the bits to be XORed on the specified port
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] bits bits to be XORed on the specified port
*/
#define pal_lld_toggleport(port, bits)
/**
- * @brief Reads a group of bits.
- *
- * @param[in] port the port identifier
- * @param[in] mask the group mask
- * @param[in] offset the group bit offset within the port
- * @return The group logical states.
+ * @brief Reads a group of bits.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] mask group mask
+ * @param[in] offset group bit offset within the port
+ * @return The group logical states.
*/
#define pal_lld_readgroup(port, mask, offset)
/**
- * @brief Writes a group of bits.
+ * @brief Writes a group of bits.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] mask the group mask
- * @param[in] offset the group bit offset within the port
- * @param[in] bits the bits to be written. Values exceeding the group width
- * are masked.
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] mask group mask
+ * @param[in] offset group bit offset within the port
+ * @param[in] bits bits to be written. Values exceeding the group width
+ * are masked.
*/
#define pal_lld_writegroup(port, mask, offset, bits)
/**
- * @brief Pads group mode setup.
+ * @brief Pads group mode setup.
* @details This function programs a pads group belonging to the same port
* with the specified mode.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note Programming an unknown or unsupported mode is silently ignored.
*
- * @param[in] port the port identifier
- * @param[in] mask the group mask
- * @param[in] mode the mode
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note Programming an unknown or unsupported mode is silently ignored.
+ * @param[in] port port identifier
+ * @param[in] mask group mask
+ * @param[in] mode group mode
*/
#define pal_lld_setgroupmode(port, mask, mode)
/**
- * @brief Reads a logical state from an I/O pad.
+ * @brief Reads a logical state from an I/O pad.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
- * @return The logical state.
- * @retval 0 low logical state.
- * @retval 1 high logical state.
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
+ * @return The logical state.
+ * @retval PAL_LOW low logical state.
+ * @retval PAL_HIGH high logical state.
*/
#define pal_lld_readpad(port, pad)
/**
- * @brief Writes a logical state on an output pad.
- *
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
- * @param[out] bit the logical value, the value must be @p 0 or @p 1
+ * @brief Writes a logical state on an output pad.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
+ * @param[out] bit logical value, the value must be @p PAL_LOW or
+ * @p PAL_HIGH
*/
#define pal_lld_writepad(port, pad, bit)
/**
- * @brief Sets a pad logical state to @p 1.
+ * @brief Sets a pad logical state to @p PAL_HIGH.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
*/
#define pal_lld_setpad(port, pad)
/**
- * @brief Clears a pad logical state to @p 0.
- *
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
+ * @brief Clears a pad logical state to @p PAL_LOW.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
*/
#define pal_lld_clearpad(port, pad)
/**
- * @brief Toggles a pad logical state.
+ * @brief Toggles a pad logical state.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
*
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
*/
#define pal_lld_togglepad(port, pad)
/**
- * @brief Pad mode setup.
+ * @brief Pad mode setup.
* @details This function programs a pad with the specified mode.
+ * @note This function is not meant to be invoked directly by the
+ * application code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
+ * @note Programming an unknown or unsupported mode is silently ignored.
*
- * @param[in] port the port identifier
- * @param[in] pad the pad number within the port
- * @param[in] mode the mode
- *
- * @note This function is not meant to be invoked directly by the application
- * code.
- * @note The @ref PAL provides a default software implementation of this
- * functionality, implement this function if can optimize it by using
- * special hardware functionalities or special coding.
- * @note Programming an unknown or unsupported mode is silently ignored.
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
+ * @param[in] mode pad mode
*/
#define pal_lld_setpadmode(port, pad, mode)
diff --git a/os/hal/templates/pwm_lld.c b/os/hal/templates/pwm_lld.c
index b132cf588..809a90608 100644
--- a/os/hal/templates/pwm_lld.c
+++ b/os/hal/templates/pwm_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/pwm_lld.c
- * @brief PWM Driver subsystem low level driver source template.
+ * @file templates/pwm_lld.c
+ * @brief PWM Driver subsystem low level driver source template.
+ *
* @addtogroup PWM_LLD
* @{
*/
@@ -48,16 +49,16 @@
/*===========================================================================*/
/**
- * @brief Low level PWM driver initialization.
+ * @brief Low level PWM driver initialization.
*/
void pwm_lld_init(void) {
}
/**
- * @brief Configures and activates the PWM peripheral.
+ * @brief Configures and activates the PWM peripheral.
*
- * @param[in] pwmp pointer to the @p PWMDriver object
+ * @param[in] pwmp pointer to the @p PWMDriver object
*/
void pwm_lld_start(PWMDriver *pwmp) {
@@ -68,23 +69,22 @@ void pwm_lld_start(PWMDriver *pwmp) {
}
/**
- * @brief Deactivates the PWM peripheral.
+ * @brief Deactivates the PWM peripheral.
*
- * @param[in] pwmp pointer to the @p PWMDriver object
+ * @param[in] pwmp pointer to the @p PWMDriver object
*/
void pwm_lld_stop(PWMDriver *pwmp) {
}
/**
- * @brief Determines whatever the PWM channel is already enabled.
+ * @brief Determines whatever the PWM channel is already enabled.
*
* @param[in] pwmp pointer to the @p PWMDriver object
* @param[in] channel PWM channel identifier
- *
- * @return The PWM channel status.
- * @retval FALSE the channel is not enabled.
- * @retval TRUE the channel is enabled.
+ * @return The PWM channel status.
+ * @retval FALSE the channel is not enabled.
+ * @retval TRUE the channel is enabled.
*/
bool_t pwm_lld_is_enabled(PWMDriver *pwmp, pwmchannel_t channel) {
@@ -92,13 +92,13 @@ bool_t pwm_lld_is_enabled(PWMDriver *pwmp, pwmchannel_t channel) {
}
/**
- * @brief Enables a callback mode for the specified PWM channel.
+ * @brief Enables a callback mode for the specified PWM channel.
* @details The callback mode must be set before starting a PWM channel.
*
* @param[in] pwmp pointer to the @p PWMDriver object
* @param[in] channel PWM channel identifier
* @param[in] edge output edge mode
- * @param[in] callback the callback function
+ * @param[in] callback callback function
*/
void pwm_lld_set_callback(PWMDriver *pwmp, pwmchannel_t channel,
pwmedge_t edge, pwmcallback_t callback) {
@@ -106,7 +106,7 @@ void pwm_lld_set_callback(PWMDriver *pwmp, pwmchannel_t channel,
}
/**
- * @brief Enables a PWM channel.
+ * @brief Enables a PWM channel.
*
* @param[in] pwmp pointer to the @p PWMDriver object
* @param[in] channel PWM channel identifier
@@ -119,7 +119,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
}
/**
- * @brief Disables a PWM channel.
+ * @brief Disables a PWM channel.
* @details The channel is disabled and its output line returned to the
* idle state.
*
diff --git a/os/hal/templates/pwm_lld.h b/os/hal/templates/pwm_lld.h
index a07bed04f..83c075510 100644
--- a/os/hal/templates/pwm_lld.h
+++ b/os/hal/templates/pwm_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/pwm_lld.h
- * @brief PWM Driver subsystem low level driver header template.
+ * @file templates/pwm_lld.h
+ * @brief PWM Driver subsystem low level driver header template.
+ *
* @addtogroup PWM_LLD
* @{
*/
@@ -36,7 +37,7 @@
/*===========================================================================*/
/**
- * @brief Number of PWM channels per PWM driver.
+ * @brief Number of PWM channels per PWM driver.
*/
#if !defined(PWM_CHANNELS) || defined(__DOXYGEN__)
#define PWM_CHANNELS 1
@@ -51,25 +52,25 @@
/*===========================================================================*/
/**
- * @brief PWM channel type.
+ * @brief PWM channel type.
*/
typedef uint8_t pwmchannel_t;
/**
- * @brief PWM counter type.
+ * @brief PWM counter type.
*/
typedef uint16_t pwmcnt_t;
/**
- * @brief Driver configuration structure.
- * @note It could be empty on some architectures.
+ * @brief Driver configuration structure.
+ * @note It could be empty on some architectures.
*/
typedef struct {
} PWMConfig;
/**
- * @brief Structure representing an PWM driver.
+ * @brief Structure representing an PWM driver.
*/
typedef struct {
/**
diff --git a/os/hal/templates/serial_lld.c b/os/hal/templates/serial_lld.c
index 1c95f7422..7fbe7f9d1 100644
--- a/os/hal/templates/serial_lld.c
+++ b/os/hal/templates/serial_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/serial_lld.c
- * @brief Serial Driver subsystem low level driver source template.
+ * @file templates/serial_lld.c
+ * @brief Serial Driver subsystem low level driver source template.
+ *
* @addtogroup SERIAL_LLD
* @{
*/
@@ -37,7 +38,9 @@
/* Driver local variables. */
/*===========================================================================*/
-/** @brief Driver default configuration.*/
+/**
+ * @brief Driver default configuration.
+ */
static const SerialConfig default_config = {
};
@@ -54,16 +57,16 @@ static const SerialConfig default_config = {
/*===========================================================================*/
/**
- * Low level serial driver initialization.
+ * @brief Low level serial driver initialization.
*/
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
*/
void sd_lld_start(SerialDriver *sdp) {
@@ -73,11 +76,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/templates/serial_lld.h b/os/hal/templates/serial_lld.h
index 7ee255fa9..a9dbb3c1a 100644
--- a/os/hal/templates/serial_lld.h
+++ b/os/hal/templates/serial_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/serial_lld.h
- * @brief Serial Driver subsystem low level driver header template.
+ * @file templates/serial_lld.h
+ * @brief Serial Driver subsystem low level driver header template.
+ *
* @addtogroup SERIAL_LLD
* @{
*/
@@ -46,18 +47,17 @@
/*===========================================================================*/
/**
- * Serial Driver condition flags type.
+ * @brief Serial Driver condition flags type.
*/
typedef uint8_t sdflags_t;
/**
- * @brief Generic Serial Driver configuration structure.
+ * @brief Generic 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 {
diff --git a/os/hal/templates/spi_lld.c b/os/hal/templates/spi_lld.c
index 50f01b6de..83862dd0a 100644
--- a/os/hal/templates/spi_lld.c
+++ b/os/hal/templates/spi_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/spi_lld.c
- * @brief SPI Driver subsystem low level driver source template.
+ * @file templates/spi_lld.c
+ * @brief SPI Driver subsystem low level driver source template.
+ *
* @addtogroup SPI_LLD
* @{
*/
@@ -50,14 +51,14 @@
/*===========================================================================*/
/**
- * @brief Low level SPI driver initialization.
+ * @brief Low level SPI driver initialization.
*/
void spi_lld_init(void) {
}
/**
- * @brief Configures and activates the SPI peripheral.
+ * @brief Configures and activates the SPI peripheral.
*
* @param[in] spip pointer to the @p SPIDriver object
*/
@@ -70,7 +71,7 @@ void spi_lld_start(SPIDriver *spip) {
}
/**
- * @brief Deactivates the SPI peripheral.
+ * @brief Deactivates the SPI peripheral.
*
* @param[in] spip pointer to the @p SPIDriver object
*/
@@ -79,7 +80,7 @@ void spi_lld_stop(SPIDriver *spip) {
}
/**
- * @brief Asserts the slave select signal and prepares for transfers.
+ * @brief Asserts the slave select signal and prepares for transfers.
*
* @param[in] spip pointer to the @p SPIDriver object
*/
@@ -88,7 +89,7 @@ void spi_lld_select(SPIDriver *spip) {
}
/**
- * @brief Deasserts the slave select signal.
+ * @brief Deasserts the slave select signal.
* @details The previously selected peripheral is unselected.
*
* @param[in] spip pointer to the @p SPIDriver object
@@ -98,7 +99,7 @@ void spi_lld_unselect(SPIDriver *spip) {
}
/**
- * @brief Ignores data on the SPI bus.
+ * @brief Ignores data on the SPI bus.
* @details This function transmits a series of idle words on the SPI bus and
* ignores the received data. This function can be invoked even
* when a slave select signal has not been yet asserted.
@@ -111,16 +112,15 @@ void spi_lld_ignore(SPIDriver *spip, size_t n) {
}
/**
- * @brief Exchanges data on the SPI bus.
+ * @brief Exchanges data on the SPI bus.
* @details This function performs a simultaneous transmit/receive operation.
+ * @note The buffers are organized as uint8_t arrays for data sizes below or
+ * equal to 8 bits else it is organized as uint16_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to be exchanged
* @param[in] txbuf the pointer to the transmit buffer
* @param[out] rxbuf the pointer to the receive buffer
- *
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
*/
void spi_lld_exchange(SPIDriver *spip, size_t n,
const void *txbuf, void *rxbuf) {
@@ -128,28 +128,26 @@ void spi_lld_exchange(SPIDriver *spip, size_t n,
}
/**
- * @brief Sends data ever the SPI bus.
+ * @brief Sends data ever the SPI bus.
+ * @note The buffers are organized as uint8_t arrays for data sizes below or
+ * equal to 8 bits else it is organized as uint16_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to send
* @param[in] txbuf the pointer to the transmit buffer
- *
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
*/
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
}
/**
- * @brief Receives data from the SPI bus.
+ * @brief Receives data from the SPI bus.
+ * @note The buffers are organized as uint8_t arrays for data sizes below or
+ * equal to 8 bits else it is organized as uint16_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to receive
* @param[out] rxbuf the pointer to the receive buffer
- *
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
*/
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {
diff --git a/os/hal/templates/spi_lld.h b/os/hal/templates/spi_lld.h
index 34145ed70..f5046f147 100644
--- a/os/hal/templates/spi_lld.h
+++ b/os/hal/templates/spi_lld.h
@@ -18,8 +18,9 @@
*/
/**
- * @file templates/spi_lld.h
- * @brief SPI Driver subsystem low level driver header template.
+ * @file templates/spi_lld.h
+ * @brief SPI Driver subsystem low level driver header template.
+ *
* @addtogroup SPI_LLD
* @{
*/
@@ -46,14 +47,14 @@
/*===========================================================================*/
/**
- * @brief Driver configuration structure.
+ * @brief Driver configuration structure.
*/
typedef struct {
} SPIConfig;
/**
- * @brief Structure representing a SPI driver.
+ * @brief Structure representing a SPI driver.
*/
typedef struct {
/**