summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorChen Wang <[email protected]>2025-02-15 12:15:19 +0800
committerGitHub <[email protected]>2025-02-15 12:15:19 +0800
commitc40b79037ce8bb09ba95411ebee1b22631cf9027 (patch)
treed4b1874eda192bd78d4f2790aed3c6f9dc6a0679 /components/drivers/include
parentf6f7d91a61c9a75ce8e79f6156a2a97f24baed90 (diff)
doxygen: add prefix for groups (#9991)
* doxygen: add prefix for groups Add "group_" prefix to doxygen group names. This makes it easier to grep with group name later. This patch only modifies the groups defined in the pathes of INPUT of documentation/Doxyfile: INPUT = . \ ../src \ ../include \ ../components/finsh \ ../components/drivers/include/drivers \ ../components/drivers/clk \ ../components/dfs/dfs_v2/src \ ../components/dfs/dfs_v2/include Other groups are not touched. Signed-off-by: Chen Wang <[email protected]> * ci: fixed error report when run file_check.py Such as: - "please delete extra space at the end of this line." - "the RT-Thread error code should return negative value. e.g. return -RT_ERROR" Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/adc.h18
-rw-r--r--components/drivers/include/drivers/blk.h8
-rw-r--r--components/drivers/include/drivers/clk.h8
-rw-r--r--components/drivers/include/drivers/dac.h8
-rw-r--r--components/drivers/include/drivers/dev_can.h8
-rw-r--r--components/drivers/include/drivers/dev_i2c.h8
-rw-r--r--components/drivers/include/drivers/dev_pin.h8
-rw-r--r--components/drivers/include/drivers/dev_pwm.h8
-rw-r--r--components/drivers/include/drivers/dev_rtc.h48
-rw-r--r--components/drivers/include/drivers/dev_serial.h14
-rw-r--r--components/drivers/include/drivers/dev_serial_v2.h72
-rw-r--r--components/drivers/include/drivers/dev_spi.h8
-rw-r--r--components/drivers/include/drivers/dev_touch.h8
13 files changed, 112 insertions, 112 deletions
diff --git a/components/drivers/include/drivers/adc.h b/components/drivers/include/drivers/adc.h
index 7189ae5eda..dfe64d4b9a 100644
--- a/components/drivers/include/drivers/adc.h
+++ b/components/drivers/include/drivers/adc.h
@@ -15,8 +15,8 @@
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup ADC ADC
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_ADC ADC
*
* @brief ADC driver api
*
@@ -57,12 +57,12 @@
*
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup ADC
+ * @addtogroup group_ADC
* @{
*/
#define RT_ADC_INTERN_CH_TEMPER (-1)
@@ -105,7 +105,7 @@ typedef enum
* @param ops device ops
* @param user_data device private data
* @return rt_err_t error code
- * @ingroup ADC
+ * @ingroup group_ADC
*/
rt_err_t rt_hw_adc_register(rt_adc_device_t adc,const char *name, const struct rt_adc_ops *ops, const void *user_data);
@@ -114,7 +114,7 @@ rt_err_t rt_hw_adc_register(rt_adc_device_t adc,const char *name, const struct r
* @param dev adc device
* @param channel adc channel
* @return rt_uint32_t adc value
- * @ingroup ADC
+ * @ingroup group_ADC
*/
rt_uint32_t rt_adc_read(rt_adc_device_t dev, rt_int8_t channel);
@@ -123,7 +123,7 @@ rt_uint32_t rt_adc_read(rt_adc_device_t dev, rt_int8_t channel);
* @param dev adc device
* @param channel adc channel
* @return rt_err_t error code
- * @ingroup ADC
+ * @ingroup group_ADC
*/
rt_err_t rt_adc_enable(rt_adc_device_t dev, rt_int8_t channel);
@@ -132,7 +132,7 @@ rt_err_t rt_adc_enable(rt_adc_device_t dev, rt_int8_t channel);
* @param dev adc device
* @param channel adc channel
* @return rt_err_t error code
- * @ingroup ADC
+ * @ingroup group_ADC
*/
rt_err_t rt_adc_disable(rt_adc_device_t dev, rt_int8_t channel);
@@ -141,7 +141,7 @@ rt_err_t rt_adc_disable(rt_adc_device_t dev, rt_int8_t channel);
* @param dev adc device
* @param channel adc channel
* @return rt_int16_t adc resolution
- * @ingroup ADC
+ * @ingroup group_ADC
*/
rt_int16_t rt_adc_voltage(rt_adc_device_t dev, rt_int8_t channel);
diff --git a/components/drivers/include/drivers/blk.h b/components/drivers/include/drivers/blk.h
index b0463e0a5c..560e617bbe 100644
--- a/components/drivers/include/drivers/blk.h
+++ b/components/drivers/include/drivers/blk.h
@@ -17,11 +17,11 @@
#include <drivers/classes/block.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup blk blk
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_blk blk
* @brief blk driver api
- * @ingroup Drivers
- * @addtogroup blk
+ * @ingroup group_Drivers
+ * @addtogroup group_blk
* @{
*/
diff --git a/components/drivers/include/drivers/clk.h b/components/drivers/include/drivers/clk.h
index 9ecf4c3bdf..fe508508d9 100644
--- a/components/drivers/include/drivers/clk.h
+++ b/components/drivers/include/drivers/clk.h
@@ -18,11 +18,11 @@
#include <drivers/ofw.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup clk clk
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_clk clk
* @brief clk driver api
- * @ingroup Drivers
- * @addtogroup clk
+ * @ingroup group_Drivers
+ * @addtogroup group_clk
* @{
*/
diff --git a/components/drivers/include/drivers/dac.h b/components/drivers/include/drivers/dac.h
index b1360c3588..6f5962c265 100644
--- a/components/drivers/include/drivers/dac.h
+++ b/components/drivers/include/drivers/dac.h
@@ -12,8 +12,8 @@
#define __DAC_H__
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup DAC DAC
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_DAC DAC
*
* @brief DAC driver api
*
@@ -60,11 +60,11 @@
*
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup DAC
+ * @addtogroup group_DAC
* @{
*/
struct rt_dac_device;
diff --git a/components/drivers/include/drivers/dev_can.h b/components/drivers/include/drivers/dev_can.h
index aed78b28d3..c7e9a36140 100644
--- a/components/drivers/include/drivers/dev_can.h
+++ b/components/drivers/include/drivers/dev_can.h
@@ -64,8 +64,8 @@ enum CANBAUD
#define RT_CAN_MODE_NOPRIV 0x00
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup CAN_Device CAN Driver
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_CAN_Device CAN Driver
*
* @brief CAN driver api
*
@@ -199,13 +199,13 @@ enum CANBAUD
* MSH_CMD_EXPORT(can_sample, can device sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*
*/
/*!
- * @addtogroup CAN_Device
+ * @addtogroup group_CAN_Device
* @{
*/
#define CAN_RX_FIFO0 (0x00000000U) /*!< CAN receive FIFO 0 */
diff --git a/components/drivers/include/drivers/dev_i2c.h b/components/drivers/include/drivers/dev_i2c.h
index dea75d2444..9ca5ba6392 100644
--- a/components/drivers/include/drivers/dev_i2c.h
+++ b/components/drivers/include/drivers/dev_i2c.h
@@ -14,8 +14,8 @@
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup I2C I2C
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_I2C I2C
*
* @brief I2C driver api
*
@@ -169,11 +169,11 @@
* MSH_CMD_EXPORT(i2c_aht10_sample, i2c aht10 sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup I2C
+ * @addtogroup group_I2C
* @{
*/
#ifdef __cplusplus
diff --git a/components/drivers/include/drivers/dev_pin.h b/components/drivers/include/drivers/dev_pin.h
index 0cb15c3af9..64a811641d 100644
--- a/components/drivers/include/drivers/dev_pin.h
+++ b/components/drivers/include/drivers/dev_pin.h
@@ -15,8 +15,8 @@
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup Pin Pin
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_Pin Pin
*
* @brief Pin driver api
*
@@ -68,11 +68,11 @@
* MSH_CMD_EXPORT(pin_beep_sample, pin beep sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup Pin
+ * @addtogroup group_Pin
* @{
*/
#ifdef __cplusplus
diff --git a/components/drivers/include/drivers/dev_pwm.h b/components/drivers/include/drivers/dev_pwm.h
index 1e0970fe25..8608eb8c70 100644
--- a/components/drivers/include/drivers/dev_pwm.h
+++ b/components/drivers/include/drivers/dev_pwm.h
@@ -14,8 +14,8 @@
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup PWM PWM
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_PWM PWM
*
* @brief PWM driver api
*
@@ -78,11 +78,11 @@
* MSH_CMD_EXPORT(pwm_led_sample, pwm sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup PWM
+ * @addtogroup group_PWM
* @{
*/
#define PWM_CMD_ENABLE (RT_DEVICE_CTRL_BASE(PWM) + 0)
diff --git a/components/drivers/include/drivers/dev_rtc.h b/components/drivers/include/drivers/dev_rtc.h
index 740142d3d7..d8e53f14c2 100644
--- a/components/drivers/include/drivers/dev_rtc.h
+++ b/components/drivers/include/drivers/dev_rtc.h
@@ -17,67 +17,67 @@
#include <rtdef.h>
#include <sys/time.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup RTC RTC
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_RTC RTC
*
* @brief RTC driver api
- *
+ *
* <b>Example</b>
* @code {.c}
- *
+ *
* #include <rtthread.h>
* #include <rtdevice.h>
- *
+ *
* #define RTC_NAME "rtc"
- *
+ *
* static int rtc_sample(int argc, char *argv[])
* {
* rt_err_t ret = RT_EOK;
* time_t now;
* rt_device_t device = RT_NULL;
- *
+ *
* device = rt_device_find(RTC_NAME);
* if (!device)
* {
* LOG_E("find %s failed!", RTC_NAME);
- * return RT_ERROR;
+ * return -RT_ERROR;
* }
- *
+ *
* if(rt_device_open(device, 0) != RT_EOK)
* {
* LOG_E("open %s failed!", RTC_NAME);
- * return RT_ERROR;
+ * return -RT_ERROR;
* }
- *
+ *
* ret = set_date(2018, 12, 3);
* if (ret != RT_EOK)
* {
* rt_kprintf("set RTC date failed\n");
* return ret;
* }
- *
+ *
* ret = set_time(11, 15, 50);
* if (ret != RT_EOK)
* {
* rt_kprintf("set RTC time failed\n");
* return ret;
* }
- *
+ *
* rt_thread_mdelay(3000);
- *
+ *
* now = time(RT_NULL);
* rt_kprintf("%s\n", ctime(&now));
- *
+ *
* return ret;
* }
* MSH_CMD_EXPORT(rtc_sample, rtc sample);
* @endcode
- *
- * @ingroup Drivers
+ *
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup RTC
+ * @addtogroup group_RTC
* @{
*/
#ifdef __cplusplus
@@ -132,7 +132,7 @@ typedef struct rt_rtc_device
/**
* @brief Register a RTC device
- *
+ *
* @param rtc RTC device
* @param name RTC device name
* @param flag RTC device flag
@@ -145,8 +145,8 @@ rt_err_t rt_hw_rtc_register(rt_rtc_dev_t *rtc,
void *data);
/**
- * @brief set date
- *
+ * @brief set date
+ *
* @param year year
* @param month month
* @param day day
@@ -156,7 +156,7 @@ rt_err_t set_date(rt_uint32_t year, rt_uint32_t month, rt_uint32_t day);
/**
* @brief set time
- *
+ *
* @param hour hour
* @param minute minute
* @param second second
@@ -166,7 +166,7 @@ rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second);
/**
* @brief set timestamp
- *
+ *
* @param timestamp A pointer to time
* @return rt_err_t error code
*/
@@ -174,7 +174,7 @@ rt_err_t set_timestamp(time_t timestamp);
/**
* @brief get timestamp
- *
+ *
* @param timestamp A secondary pointer to time
* @return rt_err_t error code
*/
diff --git a/components/drivers/include/drivers/dev_serial.h b/components/drivers/include/drivers/dev_serial.h
index b7f627e8cd..6fae356330 100644
--- a/components/drivers/include/drivers/dev_serial.h
+++ b/components/drivers/include/drivers/dev_serial.h
@@ -16,8 +16,8 @@
#include <rtthread.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup Serial Serial
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_Serial Serial
*
* @brief Serial driver api
*
@@ -106,12 +106,12 @@
* MSH_CMD_EXPORT(uart_sample, uart device sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup Serial
+ * @addtogroup group_Serial
* @{
*/
#define BAUD_RATE_2400 2400
@@ -289,7 +289,7 @@ struct rt_uart_ops
* @brief Serial interrupt service routine
* @param serial serial device
* @param event event mask
- * @ingroup Serial
+ * @ingroup group_Serial
*/
void rt_hw_serial_isr(struct rt_serial_device *serial, int event);
@@ -303,7 +303,7 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event);
* @return rt_err_t error code
* @note This function will register a serial device to system device list,
* and add a device object to system object list.
- * @ingroup Serial
+ * @ingroup group_Serial
*/
rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
const char *name,
@@ -316,7 +316,7 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
* @param serial serial device
* @return rt_err_t error code
*
- * @ingroup Serial
+ * @ingroup group_Serial
*/
rt_err_t rt_hw_serial_register_tty(struct rt_serial_device *serial);
diff --git a/components/drivers/include/drivers/dev_serial_v2.h b/components/drivers/include/drivers/dev_serial_v2.h
index 0bdc51b7ba..ef163dff0c 100644
--- a/components/drivers/include/drivers/dev_serial_v2.h
+++ b/components/drivers/include/drivers/dev_serial_v2.h
@@ -15,19 +15,19 @@
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup Serial_v2 Serial v2
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_Serial_v2 Serial v2
*
* @brief Serial v2 driver api
- *
+ *
* <b>Example</b>
* @code {.c}
- *
+ *
* #include <rtthread.h>
* #include <rtdevice.h>
- *
- * #define SAMPLE_UART_NAME "uart1"
- *
+ *
+ * #define SAMPLE_UART_NAME "uart1"
+ *
* struct rx_msg
* {
* rt_device_t dev;
@@ -35,14 +35,14 @@
* };
* static rt_device_t serial;
* static struct rt_messagequeue rx_mq;
- *
+ *
* static rt_err_t uart_input(rt_device_t dev, rt_size_t size)
* {
* struct rx_msg msg;
* rt_err_t result;
* msg.dev = dev;
* msg.size = size;
- *
+ *
* result = rt_mq_send(&rx_mq, &msg, sizeof(msg));
* if (result == -RT_EFULL)
* {
@@ -50,14 +50,14 @@
* }
* return result;
* }
- *
+ *
* static void serial_thread_entry(void *parameter)
* {
* struct rx_msg msg;
* rt_err_t result;
* rt_uint32_t rx_length;
* static char rx_buffer[BSP_UART1_RX_BUFSIZE + 1];
- *
+ *
* while (1)
* {
* rt_memset(&msg, 0, sizeof(msg));
@@ -71,14 +71,14 @@
* }
* }
* }
- *
+ *
* static int uart_dma_sample(int argc, char *argv[])
* {
* rt_err_t ret = RT_EOK;
* char uart_name[RT_NAME_MAX];
* static char msg_pool[256];
* char str[] = "hello RT-Thread!\r\n";
- *
+ *
* if (argc == 2)
* {
* rt_strncpy(uart_name, argv[1], RT_NAME_MAX);
@@ -87,24 +87,24 @@
* {
* rt_strncpy(uart_name, SAMPLE_UART_NAME, RT_NAME_MAX);
* }
- *
+ *
* serial = rt_device_find(uart_name);
* if (!serial)
* {
* rt_kprintf("find %s failed!\n", uart_name);
- * return RT_ERROR;
+ * return -RT_ERROR;
* }
- *
+ *
* rt_mq_init(&rx_mq, "rx_mq",
- * msg_pool,
- * sizeof(struct rx_msg),
- * sizeof(msg_pool),
- * RT_IPC_FLAG_FIFO);
- *
+ * msg_pool,
+ * sizeof(struct rx_msg),
+ * sizeof(msg_pool),
+ * RT_IPC_FLAG_FIFO);
+ *
* rt_device_open(serial, RT_DEVICE_FLAG_RX_NON_BLOCKING | RT_DEVICE_FLAG_TX_BLOCKING);
* rt_device_set_rx_indicate(serial, uart_input);
* rt_device_write(serial, 0, str, (sizeof(str) - 1));
- *
+ *
* rt_thread_t thread = rt_thread_create("serial", serial_thread_entry, RT_NULL, 1024, 25, 10);
* if (thread != RT_NULL)
* {
@@ -114,18 +114,18 @@
* {
* ret = RT_ERROR;
* }
- *
+ *
* return ret;
* }
* MSH_CMD_EXPORT(uart_dma_sample, uart device dma sample);
* @endcode
- *
- * @ingroup Drivers
+ *
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup Serial_v2
+ * @addtogroup group_Serial_v2
* @{
*/
@@ -221,7 +221,7 @@
/**
* @brief Serial receive indicate hook function type
- *
+ *
*/
typedef void (*rt_hw_serial_rxind_hookproto_t)(rt_device_t dev, rt_size_t size);
RT_OBJECT_HOOKLIST_DECLARE(rt_hw_serial_rxind_hookproto_t, rt_hw_serial_rxind);
@@ -258,7 +258,7 @@ struct rt_serial_rx_fifo
/**
* @brief Serial Transmit FIFO mode
- *
+ *
*/
struct rt_serial_tx_fifo
{
@@ -276,7 +276,7 @@ struct rt_serial_tx_fifo
/**
* @brief serial device structure
- *
+ *
*/
struct rt_serial_device
{
@@ -293,7 +293,7 @@ struct rt_serial_device
/**
* @brief uart device operations
- *
+ *
*/
struct rt_uart_ops
{
@@ -317,14 +317,14 @@ struct rt_uart_ops
* @brief Serial interrupt service routine
* @param serial serial device
* @param event event mask
- * @ingroup Serial_v2
+ * @ingroup group_Serial_v2
*/
void rt_hw_serial_isr(struct rt_serial_device *serial, int event);
/**
* @brief Register a serial device to device list
- *
+ *
* @param serial serial device
* @param name device name
* @param flag device flag
@@ -332,7 +332,7 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event);
* @return rt_err_t error code
* @note This function will register a serial device to system device list,
* and add a device object to system object list.
- * @ingroup Serial_v2
+ * @ingroup group_Serial_v2
*/
rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
const char *name,
@@ -341,11 +341,11 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
/**
* @brief register a serial device to system device list and add a device object to system object list
- *
+ *
* @param serial serial device
* @return rt_err_t error code
- *
- * @ingroup Serial_v2
+ *
+ * @ingroup group_Serial_v2
*/
rt_err_t rt_hw_serial_register_tty(struct rt_serial_device *serial);
diff --git a/components/drivers/include/drivers/dev_spi.h b/components/drivers/include/drivers/dev_spi.h
index ee757347f4..23cbabf15c 100644
--- a/components/drivers/include/drivers/dev_spi.h
+++ b/components/drivers/include/drivers/dev_spi.h
@@ -19,8 +19,8 @@
#include <drivers/core/driver.h>
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup SPI SPI
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_SPI SPI
*
* @brief SPI driver api
*
@@ -85,11 +85,11 @@
* MSH_CMD_EXPORT(spi_w25q_sample, spi w25q sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup SPI
+ * @addtogroup group_SPI
* @{
*/
#ifdef __cplusplus
diff --git a/components/drivers/include/drivers/dev_touch.h b/components/drivers/include/drivers/dev_touch.h
index ba01ae44f0..dd1a23f487 100644
--- a/components/drivers/include/drivers/dev_touch.h
+++ b/components/drivers/include/drivers/dev_touch.h
@@ -14,8 +14,8 @@
#include <rtthread.h>
#include "dev_pin.h"
/**
- * @addtogroup Drivers RTTHREAD Driver
- * @defgroup Touch Touch
+ * @addtogroup group_Drivers RTTHREAD Driver
+ * @defgroup group_Touch Touch
*
* @brief Touch driver api
*
@@ -112,11 +112,11 @@
* MSH_CMD_EXPORT(gt9147_sample, gt9147 sample);
* @endcode
*
- * @ingroup Drivers
+ * @ingroup group_Drivers
*/
/*!
- * @addtogroup Touch
+ * @addtogroup group_Touch
* @{
*/
#ifdef __cplusplus