From d6858a0ca47ed71f97c11674a86296ca0b8fb45c Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 4 Jan 2023 20:57:46 +0100 Subject: [PATCH] drivers/pulse_counter: Add missing doc and fix doccheck This commits add documentation to the pulse counter params and adds generic exclude patters to the doc check, so that when boards provide custom pulse counter params they do not need to document them again. The reasoning is that the documentation in the central place is sufficient. --- dist/tools/doccheck/exclude_patterns | 6 ------ dist/tools/doccheck/generic_exclude_patterns | 3 +++ .../include/pulse_counter_params.h | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dist/tools/doccheck/exclude_patterns b/dist/tools/doccheck/exclude_patterns index adb294ec79..b7d65f23b7 100644 --- a/dist/tools/doccheck/exclude_patterns +++ b/dist/tools/doccheck/exclude_patterns @@ -1586,8 +1586,6 @@ boards/hamilton/include/board\.h:[0-9]+: warning: Member HDC1000_PARAM_ADDR \(ma boards/hamilton/include/board\.h:[0-9]+: warning: Member HDC1000_PARAM_I2C \(macro definition\) of group boards_hamilton is not documented\. boards/hamilton/include/board\.h:[0-9]+: warning: Member HDC1000_PARAM_RENEW_INTERVAL \(macro definition\) of group boards_hamilton is not documented\. boards/hamilton/include/board\.h:[0-9]+: warning: Member HDC1000_PARAM_RES \(macro definition\) of group boards_hamilton is not documented\. -boards/hamilton/include/board\.h:[0-9]+: warning: Member PULSE_COUNTER_GPIO \(macro definition\) of group boards_hamilton is not documented\. -boards/hamilton/include/board\.h:[0-9]+: warning: Member PULSE_COUNTER_GPIO_FLANK \(macro definition\) of group boards_hamilton is not documented\. boards/hamilton/include/board\.h:[0-9]+: warning: Member TMP006_PARAM_ADDR \(macro definition\) of group boards_hamilton is not documented\. boards/hamilton/include/board\.h:[0-9]+: warning: Member TMP006_PARAM_I2C \(macro definition\) of group boards_hamilton is not documented\. boards/hamilton/include/board\.h:[0-9]+: warning: Member TMP006_PARAM_RATE \(macro definition\) of group boards_hamilton is not documented\. @@ -9825,10 +9823,6 @@ drivers/ph_oem/include/ph_oem_params\.h:[0-9]+: warning: Member PH_OEM_PARAM_INT drivers/ph_oem/include/ph_oem_params\.h:[0-9]+: warning: Member PH_OEM_PARAM_INTERRUPT_OPTION \(macro definition\) of file ph_oem_params\.h is not documented\. drivers/ph_oem/include/ph_oem_params\.h:[0-9]+: warning: Member PH_OEM_PARAM_INTERRUPT_PIN \(macro definition\) of file ph_oem_params\.h is not documented\. drivers/ph_oem/include/ph_oem_params\.h:[0-9]+: warning: Member PH_OEM_SAUL_INFO \(macro definition\) of file ph_oem_params\.h is not documented\. -drivers/pulse_counter/include/pulse_counter_params\.h:[0-9]+: warning: Member PULSE_COUNTER_GPIO \(macro definition\) of file pulse_counter_params\.h is not documented\. -drivers/pulse_counter/include/pulse_counter_params\.h:[0-9]+: warning: Member PULSE_COUNTER_GPIO_FLANK \(macro definition\) of file pulse_counter_params\.h is not documented\. -drivers/pulse_counter/include/pulse_counter_params\.h:[0-9]+: warning: Member PULSE_COUNTER_PARAMS \(macro definition\) of file pulse_counter_params\.h is not documented\. -drivers/pulse_counter/include/pulse_counter_params\.h:[0-9]+: warning: Member PULSE_COUNTER_SAUL_INFO \(macro definition\) of file pulse_counter_params\.h is not documented\. drivers/qmc5883l/include/qmc5883l_params\.h:[0-9]+: warning: Member QMC5883L_PARAMS \(macro definition\) of file qmc5883l_params\.h is not documented\. drivers/qmc5883l/include/qmc5883l_params\.h:[0-9]+: warning: Member QMC5883L_PARAM_I2C \(macro definition\) of file qmc5883l_params\.h is not documented\. drivers/qmc5883l/include/qmc5883l_params\.h:[0-9]+: warning: Member QMC5883L_PARAM_ODR \(macro definition\) of file qmc5883l_params\.h is not documented\. diff --git a/dist/tools/doccheck/generic_exclude_patterns b/dist/tools/doccheck/generic_exclude_patterns index e84dd6f71b..23a166c77c 100644 --- a/dist/tools/doccheck/generic_exclude_patterns +++ b/dist/tools/doccheck/generic_exclude_patterns @@ -20,6 +20,9 @@ warning: Member LED[0-9]_TOGGLE \(macro definition\) of warning: Member PIR_PARAM_ACTIVE_HIGH \(macro definition\) of warning: Member PIR_PARAM_GPIO \(macro definition\) of warning: Member PIR_SAUL_INFO \(macro definition\) of +warning: Member PULSE_COUNTER_GPIO \(macro definition\) of +warning: Member PULSE_COUNTER_GPIO_FLANK \(macro definition\) of +warning: Member PULSE_COUNTER_SAUL_INFO \(macro definition\) of warning: Member SHT1X_PARAMS \(macro definition\) of warning: Member SHT1X_PARAM_[A-Z0-9_]* \(macro definition\) of warning: Member SHT1X_SAULINFO \(macro definition\) of diff --git a/drivers/pulse_counter/include/pulse_counter_params.h b/drivers/pulse_counter/include/pulse_counter_params.h index 569f34939c..b6206411f9 100644 --- a/drivers/pulse_counter/include/pulse_counter_params.h +++ b/drivers/pulse_counter/include/pulse_counter_params.h @@ -27,20 +27,36 @@ extern "C" { #endif +/** + * @name GPIO pulse counter driver initialization parameters + * @{ + */ #ifndef PULSE_COUNTER_GPIO +/** + * @brief The GPIO pin to count pulses of + */ #define PULSE_COUNTER_GPIO GPIO_PIN(0, 18) #endif #ifndef PULSE_COUNTER_GPIO_FLANK +/** + * @brief The signal flank to count pulses at + */ #define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING #endif #ifndef PULSE_COUNTER_PARAMS +/** + * @brief The pulse counter parameters to initialize the driver with + */ #define PULSE_COUNTER_PARAMS { .gpio = PULSE_COUNTER_GPIO, \ .gpio_flank = PULSE_COUNTER_GPIO_FLANK } #endif #ifndef PULSE_COUNTER_SAUL_INFO +/** + * @brief The SAUL info to use when registering the pulse counter instances + */ #define PULSE_COUNTER_SAUL_INFO { .name = "pulse counter" } #endif @@ -60,6 +76,8 @@ static const saul_reg_info_t pulse_counter_saul_info[] = PULSE_COUNTER_SAUL_INFO }; +/** @} */ + #ifdef __cplusplus } #endif