From 3425f06d39e40ba59fd6b119d6039d4e1a9a267e Mon Sep 17 00:00:00 2001 From: lishifeng Date: Sat, 4 Jan 2025 20:38:51 +0800 Subject: [PATCH] fix: fix doc errors --- CHANGELOG.md | 6 ++ doc/html/group__tm1638__basic__driver.html | 52 +++++----- doc/html/group__tm1638__example__driver.html | 8 +- doc/html/group__tm1638__extern__driver.html | 16 ++-- .../group__tm1638__interface__driver.html | 16 ++-- doc/html/group__tm1638__link__driver.html | 28 +++--- doc/html/group__tm1638__test__driver.html | 2 +- example/driver_tm1638_basic.c | 8 +- example/driver_tm1638_basic.h | 8 +- interface/driver_tm1638_interface.h | 16 ++-- interface/driver_tm1638_interface_template.c | 16 ++-- .../raspberrypi4b_driver_tm1638_interface.c | 16 ++-- project/raspberrypi4b/src/client.c | 9 +- project/raspberrypi4b/src/main.c | 10 +- project/stm32f407/MDK/stm32f407.uvprojx | 13 +-- .../src/stm32f407_driver_tm1638_interface.c | 16 ++-- project/stm32f407/usr/src/getopt.c | 52 ++++------ project/stm32f407/usr/src/main.c | 4 +- src/driver_tm1638.c | 86 ++++++++--------- src/driver_tm1638.h | 96 +++++++++---------- test/driver_tm1638_read_test.c | 2 +- test/driver_tm1638_read_test.h | 2 +- 22 files changed, 239 insertions(+), 243 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3577ceb..6257941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.3 (2025-01-01) + +## Bug Fixes + +- fix doc errors + ## 1.0.2 (2024-08-10) ## Bug Fixes diff --git a/doc/html/group__tm1638__basic__driver.html b/doc/html/group__tm1638__basic__driver.html index d4c88bd..320661b 100644 --- a/doc/html/group__tm1638__basic__driver.html +++ b/doc/html/group__tm1638__basic__driver.html @@ -384,7 +384,7 @@

Parameters
- +
[in]*handlepoints to a tm1638 handle structure
[in]*handlepointer to a tm1638 handle structure
@@ -420,7 +420,7 @@

Parameters
- +
[in]*handlepoints to a tm1638 handle structure
[in]*handlepointer to a tm1638 handle structure
@@ -467,8 +467,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[out]*modepoints to an address mode buffer
[in]*handlepointer to a tm1638 handle structure
[out]*modepointer to an address mode buffer
@@ -513,8 +513,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[out]*enablepoints to a bool value buffer
[in]*handlepointer to a tm1638 handle structure
[out]*enablepointer to a bool value buffer
@@ -559,8 +559,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[out]*widthpoints to a pulse width buffer
[in]*handlepointer to a tm1638 handle structure
[out]*widthpointer to a pulse width buffer
@@ -605,8 +605,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[out]*enablepoints to a bool value buffer
[in]*handlepointer to a tm1638 handle structure
[out]*enablepointer to a bool value buffer
@@ -641,7 +641,7 @@

Parameters
- +
[out]*infopoints to a tm1638 info structure
[out]*infopointer to a tm1638 info structure
@@ -675,7 +675,7 @@

Parameters
- +
[in]*handlepoints to a tm1638 handle structure
[in]*handlepointer to a tm1638 handle structure
@@ -721,8 +721,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[out]*segkpoints to a segk buffer
[in]*handlepointer to a tm1638 handle structure
[out]*segkpointer to a segk buffer
@@ -768,8 +768,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[in]modeis the address mode
[in]*handlepointer to a tm1638 handle structure
[in]modeaddress mode
@@ -815,8 +815,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[in]enableis a bool value
[in]*handlepointer to a tm1638 handle structure
[in]enablebool value
@@ -862,8 +862,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[in]widthis the pulse width
[in]*handlepointer to a tm1638 handle structure
[in]widthpulse width
@@ -909,8 +909,8 @@

Parameters
- - + +
[in]*handlepoints to a tm1638 handle structure
[in]enableis a bool value
[in]*handlepointer to a tm1638 handle structure
[in]enablebool value
@@ -968,10 +968,10 @@

Parameters
- - - - + + + +
[in]*handlepoints to a tm1638 handle structure
[in]addris the start address
[in]*datapoints to a data buffer
[in]lenis the data length
[in]*handlepointer to a tm1638 handle structure
[in]addrstart address
[in]*datapointer to a data buffer
[in]lendata length
diff --git a/doc/html/group__tm1638__example__driver.html b/doc/html/group__tm1638__example__driver.html index 7f0ea2a..ef18838 100644 --- a/doc/html/group__tm1638__example__driver.html +++ b/doc/html/group__tm1638__example__driver.html @@ -326,7 +326,7 @@

Parameters
- +
[out]*segkpoints to a segk buffer
[out]*segkpointer to a segk buffer
@@ -376,9 +376,9 @@

Parameters
- - - + + +
[in]addris the start address
[in]*datapoints to a data buffer
[in]lenis the data length
[in]addrstart address
[in]*datapointer to a data buffer
[in]lendata length
diff --git a/doc/html/group__tm1638__extern__driver.html b/doc/html/group__tm1638__extern__driver.html index 1acc520..52961f3 100644 --- a/doc/html/group__tm1638__extern__driver.html +++ b/doc/html/group__tm1638__extern__driver.html @@ -147,10 +147,10 @@

Parameters
- - - - + + + +
[in]*handlepoints to a tm1638 handle structure
[in]cmdis the send command
[out]*datapoints to a data buffer
[in]lenis the data buffer length
[in]*handlepointer to a tm1638 handle structure
[in]cmdsent command
[out]*datapointer to a data buffer
[in]lendata buffer length
@@ -208,10 +208,10 @@

Parameters
- - - - + + + +
[in]*handlepoints to a tm1638 handle structure
[in]cmdis the send command
[in]*datapoints to a data buffer
[in]lenis the data buffer length
[in]*handlepointer to a tm1638 handle structure
[in]cmdsent command
[in]*datapointer to a data buffer
[in]lendata buffer length
diff --git a/doc/html/group__tm1638__interface__driver.html b/doc/html/group__tm1638__interface__driver.html index a6ffd84..8cf239f 100644 --- a/doc/html/group__tm1638__interface__driver.html +++ b/doc/html/group__tm1638__interface__driver.html @@ -147,7 +147,7 @@

Parameters
- +
[in]fmtis the format data
[in]fmtformat data
@@ -176,7 +176,7 @@

Parameters
- +
[in]ms
[in]mstime
@@ -277,9 +277,9 @@

Parameters
- - - + + +
[in]addris the register address
[out]*bufpoints to a data buffer
[in]lenis the length of data buffer
[in]addrregister address
[out]*bufpointer to a data buffer
[in]lenlength of data buffer
@@ -329,9 +329,9 @@

Parameters
- - - + + +
[in]addris the register address
[in]*bufpoints to a data buffer
[in]lenis the length of data buffer
[in]addrregister address
[in]*bufpointer to a data buffer
[in]lenlength of data buffer
diff --git a/doc/html/group__tm1638__link__driver.html b/doc/html/group__tm1638__link__driver.html index 3edd905..4344642 100644 --- a/doc/html/group__tm1638__link__driver.html +++ b/doc/html/group__tm1638__link__driver.html @@ -150,8 +150,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a debug_print function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a debug_print function address
@@ -190,8 +190,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a delay_ms function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a delay_ms function address
@@ -230,8 +230,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]STRUCTUREis tm1638_handle_t
[in]HANDLEpointer to a tm1638 handle structure
[in]STRUCTUREtm1638_handle_t
@@ -270,8 +270,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a spi_deinit function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a spi_deinit function address
@@ -310,8 +310,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a spi_init function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a spi_init function address
@@ -350,8 +350,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a spi_read function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a spi_read function address
@@ -390,8 +390,8 @@

Parameters
- - + +
[in]HANDLEpoints to a tm1638 handle structure
[in]FUCpoints to a spi_write function address
[in]HANDLEpointer to a tm1638 handle structure
[in]FUCpointer to a spi_write function address
diff --git a/doc/html/group__tm1638__test__driver.html b/doc/html/group__tm1638__test__driver.html index 9852a77..dd5c293 100644 --- a/doc/html/group__tm1638__test__driver.html +++ b/doc/html/group__tm1638__test__driver.html @@ -125,7 +125,7 @@

Parameters
- +
[in]timesis the test times
[in]timestest times
diff --git a/example/driver_tm1638_basic.c b/example/driver_tm1638_basic.c index c8b0cb8..cf31fb0 100644 --- a/example/driver_tm1638_basic.c +++ b/example/driver_tm1638_basic.c @@ -122,9 +122,9 @@ uint8_t tm1638_basic_init(void) /** * @brief basic example write - * @param[in] addr is the start address - * @param[in] *data points to a data buffer - * @param[in] len is the data length + * @param[in] addr start address + * @param[in] *data pointer to a data buffer + * @param[in] len data length * @return status code * - 0 success * - 1 write failed @@ -209,7 +209,7 @@ uint8_t tm1638_basic_display_off(void) /** * @brief basic example read - * @param[out] *segk points to a segk buffer + * @param[out] *segk pointer to a segk buffer * @return status code * - 0 success * - 1 read failed diff --git a/example/driver_tm1638_basic.h b/example/driver_tm1638_basic.h index 5258a94..c0f4a26 100644 --- a/example/driver_tm1638_basic.h +++ b/example/driver_tm1638_basic.h @@ -76,9 +76,9 @@ uint8_t tm1638_basic_deinit(void); /** * @brief basic example write - * @param[in] addr is the start address - * @param[in] *data points to a data buffer - * @param[in] len is the data length + * @param[in] addr start address + * @param[in] *data pointer to a data buffer + * @param[in] len data length * @return status code * - 0 success * - 1 write failed @@ -88,7 +88,7 @@ uint8_t tm1638_basic_write(uint8_t addr, uint16_t *data, uint8_t len); /** * @brief basic example read - * @param[out] *segk points to a segk buffer + * @param[out] *segk pointer to a segk buffer * @return status code * - 0 success * - 1 read failed diff --git a/interface/driver_tm1638_interface.h b/interface/driver_tm1638_interface.h index 8a19893..4e0397e 100644 --- a/interface/driver_tm1638_interface.h +++ b/interface/driver_tm1638_interface.h @@ -70,9 +70,9 @@ uint8_t tm1638_interface_spi_deinit(void); /** * @brief interface spi write - * @param[in] addr is the register address - * @param[in] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[in] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi write failed @@ -82,9 +82,9 @@ uint8_t tm1638_interface_spi_write(uint8_t addr, uint8_t *buf, uint16_t len); /** * @brief interface spi read - * @param[in] addr is the register address - * @param[out] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[out] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi read failed @@ -94,14 +94,14 @@ uint8_t tm1638_interface_spi_read(uint8_t addr, uint8_t *buf, uint16_t len); /** * @brief interface delay ms - * @param[in] ms + * @param[in] ms time * @note none */ void tm1638_interface_delay_ms(uint32_t ms); /** * @brief interface print format data - * @param[in] fmt is the format data + * @param[in] fmt format data * @note none */ void tm1638_interface_debug_print(const char *const fmt, ...); diff --git a/interface/driver_tm1638_interface_template.c b/interface/driver_tm1638_interface_template.c index c541dd4..a32bd1c 100644 --- a/interface/driver_tm1638_interface_template.c +++ b/interface/driver_tm1638_interface_template.c @@ -62,9 +62,9 @@ uint8_t tm1638_interface_spi_deinit(void) /** * @brief interface spi write - * @param[in] addr is the register address - * @param[in] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[in] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi write failed @@ -77,9 +77,9 @@ uint8_t tm1638_interface_spi_write(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface spi read - * @param[in] addr is the register address - * @param[out] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[out] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi read failed @@ -92,7 +92,7 @@ uint8_t tm1638_interface_spi_read(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface delay ms - * @param[in] ms + * @param[in] ms time * @note none */ void tm1638_interface_delay_ms(uint32_t ms) @@ -102,7 +102,7 @@ void tm1638_interface_delay_ms(uint32_t ms) /** * @brief interface print format data - * @param[in] fmt is the format data + * @param[in] fmt format data * @note none */ void tm1638_interface_debug_print(const char *const fmt, ...) diff --git a/project/raspberrypi4b/driver/src/raspberrypi4b_driver_tm1638_interface.c b/project/raspberrypi4b/driver/src/raspberrypi4b_driver_tm1638_interface.c index f368c31..4b3cbf2 100644 --- a/project/raspberrypi4b/driver/src/raspberrypi4b_driver_tm1638_interface.c +++ b/project/raspberrypi4b/driver/src/raspberrypi4b_driver_tm1638_interface.c @@ -74,9 +74,9 @@ uint8_t tm1638_interface_spi_deinit(void) /** * @brief interface spi write - * @param[in] addr is the register address - * @param[in] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[in] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi write failed @@ -89,9 +89,9 @@ uint8_t tm1638_interface_spi_write(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface spi read - * @param[in] addr is the register address - * @param[out] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[out] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi read failed @@ -104,7 +104,7 @@ uint8_t tm1638_interface_spi_read(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface delay ms - * @param[in] ms + * @param[in] ms time * @note none */ void tm1638_interface_delay_ms(uint32_t ms) @@ -114,7 +114,7 @@ void tm1638_interface_delay_ms(uint32_t ms) /** * @brief interface print format data - * @param[in] fmt is the format data + * @param[in] fmt format data * @note none */ void tm1638_interface_debug_print(const char *const fmt, ...) diff --git a/project/raspberrypi4b/src/client.c b/project/raspberrypi4b/src/client.c index 3014333..606923e 100644 --- a/project/raspberrypi4b/src/client.c +++ b/project/raspberrypi4b/src/client.c @@ -53,8 +53,13 @@ static int gs_conn_fd; /**< network handle */ static struct sockaddr_in gs_server_addr; /**< server address */ /** - * @brief main function - * @note none + * @brief main function + * @param[in] argc arg numbers + * @param[in] **argv arg address + * @return status code + * - 0 success + * - 1 run failed + * @note none */ int main(uint8_t argc, char **argv) { diff --git a/project/raspberrypi4b/src/main.c b/project/raspberrypi4b/src/main.c index 72d9823..ca1e4cc 100644 --- a/project/raspberrypi4b/src/main.c +++ b/project/raspberrypi4b/src/main.c @@ -57,8 +57,8 @@ static struct sockaddr_in gs_server_addr; /**< server address */ /** * @brief tm1638 full function - * @param[in] argc is arg numbers - * @param[in] **argv is the arg address + * @param[in] argc arg numbers + * @param[in] **argv arg address * @return status code * - 0 success * - 1 run failed @@ -453,8 +453,8 @@ static uint8_t a_socket_init(void) /** * @brief socket read - * @param[in] *buf points to a buffer address - * @param[in] len is the buffer length + * @param[in] *buf pointer to a buffer address + * @param[in] len buffer length * @return status code * - 0 success * - 1 read failed @@ -485,7 +485,7 @@ static uint16_t a_socket_read(uint8_t *buf, uint16_t len) /** * @brief signal handler - * @param[in] signum is the signal number + * @param[in] signum signal number * @note none */ static void a_sig_handler(int signum) diff --git a/project/stm32f407/MDK/stm32f407.uvprojx b/project/stm32f407/MDK/stm32f407.uvprojx index 85f520c..97e22e8 100644 --- a/project/stm32f407/MDK/stm32f407.uvprojx +++ b/project/stm32f407/MDK/stm32f407.uvprojx @@ -10,15 +10,14 @@ stm32f407 0x4 ARM-ADS - 6140000::V6.14::ARMCLANG - 6140000::V6.14::ARMCLANG + 6220000::V6.22::ARMCLANG 1 STM32F407ZGTx STMicroelectronics - Keil.STM32F4xx_DFP.2.14.0 - http://www.keil.com/pack/ + Keil.STM32F4xx_DFP.3.0.0 + https://www.keil.com/pack/ IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -187,6 +186,7 @@ 2 0 0 + 0 1 0 8 @@ -960,11 +960,6 @@ <Project Info> - - - - - 0 1 diff --git a/project/stm32f407/driver/src/stm32f407_driver_tm1638_interface.c b/project/stm32f407/driver/src/stm32f407_driver_tm1638_interface.c index db85fe7..540884d 100644 --- a/project/stm32f407/driver/src/stm32f407_driver_tm1638_interface.c +++ b/project/stm32f407/driver/src/stm32f407_driver_tm1638_interface.c @@ -66,9 +66,9 @@ uint8_t tm1638_interface_spi_deinit(void) /** * @brief interface spi write - * @param[in] addr is the register address - * @param[in] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[in] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi write failed @@ -81,9 +81,9 @@ uint8_t tm1638_interface_spi_write(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface spi read - * @param[in] addr is the register address - * @param[out] *buf points to a data buffer - * @param[in] len is the length of data buffer + * @param[in] addr register address + * @param[out] *buf pointer to a data buffer + * @param[in] len length of data buffer * @return status code * - 0 success * - 1 spi read failed @@ -96,7 +96,7 @@ uint8_t tm1638_interface_spi_read(uint8_t addr, uint8_t *buf, uint16_t len) /** * @brief interface delay ms - * @param[in] ms + * @param[in] ms time * @note none */ void tm1638_interface_delay_ms(uint32_t ms) @@ -106,7 +106,7 @@ void tm1638_interface_delay_ms(uint32_t ms) /** * @brief interface print format data - * @param[in] fmt is the format data + * @param[in] fmt format data * @note none */ void tm1638_interface_debug_print(const char *const fmt, ...) diff --git a/project/stm32f407/usr/src/getopt.c b/project/stm32f407/usr/src/getopt.c index b9499bc..bf4a0d1 100644 --- a/project/stm32f407/usr/src/getopt.c +++ b/project/stm32f407/usr/src/getopt.c @@ -180,9 +180,7 @@ static char *my_index (const char *str, int chr); extern char *getenv (); #endif -static int -my_strlen (str) - const char *str; +static int my_strlen(const char *str) { int n = 0; while (*str++) @@ -190,10 +188,7 @@ my_strlen (str) return n; } -static char * -my_index (str, chr) - const char *str; - int chr; +static char *my_index(const char *str, int chr) { while (*str) { @@ -234,12 +229,10 @@ static int last_nonopt; */ #if __STDC__ || defined(PROTO) -static void exchange (char **argv); +static void exchange(char **argv); #endif -static void -exchange (argv) - char **argv; +static void exchange(char **argv) { char *temp, **first, **last; @@ -322,14 +315,13 @@ exchange (argv) If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; +int _getopt_internal(int argc, + char *const *argv, + const char *optstring, + const struct option *longopts, + int *longind, + int long_only + ) { int option_index; @@ -656,11 +648,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } } -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +int getopt(int argc, + char *const *argv, + const char *optstring + ) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, @@ -668,13 +659,12 @@ getopt (argc, argv, optstring) 0); } -int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +int getopt_long(int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index + ) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } diff --git a/project/stm32f407/usr/src/main.c b/project/stm32f407/usr/src/main.c index 2f8c912..f0ba0ac 100644 --- a/project/stm32f407/usr/src/main.c +++ b/project/stm32f407/usr/src/main.c @@ -52,8 +52,8 @@ volatile uint16_t g_len; /**< uart buffer length */ /** * @brief tm1638 full function - * @param[in] argc is arg numbers - * @param[in] **argv is the arg address + * @param[in] argc arg numbers + * @param[in] **argv arg address * @return status code * - 0 success * - 1 run failed diff --git a/src/driver_tm1638.c b/src/driver_tm1638.c index 65e0e60..1508e44 100644 --- a/src/driver_tm1638.c +++ b/src/driver_tm1638.c @@ -57,7 +57,7 @@ /** * @brief high low shift - * @param[in] data is the input data + * @param[in] data input data * @return output data * @note none */ @@ -74,10 +74,10 @@ static uint8_t a_high_low_shift(uint8_t data) /** * @brief spi write - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the set command - * @param[in] *buf points to a data buffer - * @param[in] len is the buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd set command + * @param[in] *buf pointer to a data buffer + * @param[in] len buffer length * @return status code * - 0 success * - 1 write failed @@ -106,10 +106,10 @@ static uint8_t a_tm1638_write(tm1638_handle_t *handle, uint8_t cmd, uint8_t *buf /** * @brief spi read - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the set command - * @param[out] *buf points to a data buffer - * @param[in] len is the buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd set command + * @param[out] *buf pointer to a data buffer + * @param[in] len buffer length * @return status code * - 0 success * - 1 read failed @@ -133,7 +133,7 @@ static uint8_t a_tm1638_read(tm1638_handle_t *handle, uint8_t cmd, uint8_t *buf, /** * @brief initialize the chip - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 spi initialization failed @@ -197,7 +197,7 @@ uint8_t tm1638_init(tm1638_handle_t *handle) /** * @brief close the chip - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 spi deinit failed @@ -244,8 +244,8 @@ uint8_t tm1638_deinit(tm1638_handle_t *handle) /** * @brief set pulse width - * @param[in] *handle points to a tm1638 handle structure - * @param[in] width is the pulse width + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] width pulse width * @return status code * - 0 success * - 1 set pulse width failed @@ -283,8 +283,8 @@ uint8_t tm1638_set_pulse_width(tm1638_handle_t *handle, tm1638_pulse_width_t wid /** * @brief get pulse width - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *width points to a pulse width buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *width pointer to a pulse width buffer * @return status code * - 0 success * - 2 handle is NULL @@ -309,8 +309,8 @@ uint8_t tm1638_get_pulse_width(tm1638_handle_t *handle, tm1638_pulse_width_t *wi /** * @brief enable or disable display - * @param[in] *handle points to a tm1638 handle structure - * @param[in] enable is a bool value + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] enable bool value * @return status code * - 0 success * - 1 set display failed @@ -348,8 +348,8 @@ uint8_t tm1638_set_display(tm1638_handle_t *handle, tm1638_bool_t enable) /** * @brief get display status - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *enable points to a bool value buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *enable pointer to a bool value buffer * @return status code * - 0 success * - 2 handle is NULL @@ -374,8 +374,8 @@ uint8_t tm1638_get_display(tm1638_handle_t *handle, tm1638_bool_t *enable) /** * @brief set address mode - * @param[in] *handle points to a tm1638 handle structure - * @param[in] mode is the address mode + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] mode address mode * @return status code * - 0 success * - 1 set address mode failed @@ -413,8 +413,8 @@ uint8_t tm1638_set_address_mode(tm1638_handle_t *handle, tm1638_address_mode_t m /** * @brief get address mode - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *mode points to an address mode buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *mode pointer to an address mode buffer * @return status code * - 0 success * - 2 handle is NULL @@ -439,8 +439,8 @@ uint8_t tm1638_get_address_mode(tm1638_handle_t *handle, tm1638_address_mode_t * /** * @brief enable or disable test mode - * @param[in] *handle points to a tm1638 handle structure - * @param[in] enable is a bool value + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] enable bool value * @return status code * - 0 success * - 1 set test mode failed @@ -478,8 +478,8 @@ uint8_t tm1638_set_test_mode(tm1638_handle_t *handle, tm1638_bool_t enable) /** * @brief get test mode status - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *enable points to a bool value buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *enable pointer to a bool value buffer * @return status code * - 0 success * - 2 handle is NULL @@ -504,7 +504,7 @@ uint8_t tm1638_get_test_mode(tm1638_handle_t *handle, tm1638_bool_t *enable) /** * @brief clear segment - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 clear segment failed @@ -588,10 +588,10 @@ uint8_t tm1638_clear_segment(tm1638_handle_t *handle) /** * @brief write segment - * @param[in] *handle points to a tm1638 handle structure - * @param[in] addr is the start address - * @param[in] *data points to a data buffer - * @param[in] len is the data length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] addr start address + * @param[in] *data pointer to a data buffer + * @param[in] len data length * @return status code * - 0 success * - 1 write segment failed @@ -681,8 +681,8 @@ uint8_t tm1638_write_segment(tm1638_handle_t *handle, uint8_t addr, uint16_t *da /** * @brief read segment - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *segk points to a segk buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *segk pointer to a segk buffer * @return status code * - 0 success * - 1 read segment failed @@ -718,10 +718,10 @@ uint8_t tm1638_read_segment(tm1638_handle_t *handle, uint8_t segk[4]) /** * @brief set the chip register - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the send command - * @param[in] *data points to a data buffer - * @param[in] len is the data buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd sent command + * @param[in] *data pointer to a data buffer + * @param[in] len data buffer length * @return status code * - 0 success * - 1 write failed @@ -755,10 +755,10 @@ uint8_t tm1638_set_reg(tm1638_handle_t *handle, uint8_t cmd, uint8_t *data, uint /** * @brief get the chip register - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the send command - * @param[out] *data points to a data buffer - * @param[in] len is the data buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd sent command + * @param[out] *data pointer to a data buffer + * @param[in] len data buffer length * @return status code * - 0 success * - 1 read failed @@ -792,7 +792,7 @@ uint8_t tm1638_get_reg(tm1638_handle_t *handle, uint8_t cmd, uint8_t *data, uint /** * @brief get chip's information - * @param[out] *info points to a tm1638 info structure + * @param[out] *info pointer to a tm1638 info structure * @return status code * - 0 success * - 2 handle is NULL diff --git a/src/driver_tm1638.h b/src/driver_tm1638.h index e0f9c64..6c52135 100644 --- a/src/driver_tm1638.h +++ b/src/driver_tm1638.h @@ -151,56 +151,56 @@ typedef struct tm1638_info_s /** * @brief initialize tm1638_handle_t structure - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] STRUCTURE is tm1638_handle_t + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] STRUCTURE tm1638_handle_t * @note none */ #define DRIVER_TM1638_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE)) /** * @brief link spi_init function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a spi_init function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a spi_init function address * @note none */ #define DRIVER_TM1638_LINK_SPI_INIT(HANDLE, FUC) (HANDLE)->spi_init = FUC /** * @brief link spi_deinit function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a spi_deinit function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a spi_deinit function address * @note none */ #define DRIVER_TM1638_LINK_SPI_DEINIT(HANDLE, FUC) (HANDLE)->spi_deinit = FUC /** * @brief link spi_write function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a spi_write function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a spi_write function address * @note none */ #define DRIVER_TM1638_LINK_SPI_WRITE(HANDLE, FUC) (HANDLE)->spi_write = FUC /** * @brief link spi_read function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a spi_read function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a spi_read function address * @note none */ #define DRIVER_TM1638_LINK_SPI_READ(HANDLE, FUC) (HANDLE)->spi_read = FUC /** * @brief link delay_ms function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a delay_ms function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a delay_ms function address * @note none */ #define DRIVER_TM1638_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC /** * @brief link debug_print function - * @param[in] HANDLE points to a tm1638 handle structure - * @param[in] FUC points to a debug_print function address + * @param[in] HANDLE pointer to a tm1638 handle structure + * @param[in] FUC pointer to a debug_print function address * @note none */ #define DRIVER_TM1638_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC @@ -218,7 +218,7 @@ typedef struct tm1638_info_s /** * @brief get chip's information - * @param[out] *info points to a tm1638 info structure + * @param[out] *info pointer to a tm1638 info structure * @return status code * - 0 success * - 2 handle is NULL @@ -228,7 +228,7 @@ uint8_t tm1638_info(tm1638_info_t *info); /** * @brief initialize the chip - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 spi initialization failed @@ -240,7 +240,7 @@ uint8_t tm1638_init(tm1638_handle_t *handle); /** * @brief clear segment - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 clear segment failed @@ -252,7 +252,7 @@ uint8_t tm1638_clear_segment(tm1638_handle_t *handle); /** * @brief close the chip - * @param[in] *handle points to a tm1638 handle structure + * @param[in] *handle pointer to a tm1638 handle structure * @return status code * - 0 success * - 1 spi deinit failed @@ -265,10 +265,10 @@ uint8_t tm1638_deinit(tm1638_handle_t *handle); /** * @brief write segment - * @param[in] *handle points to a tm1638 handle structure - * @param[in] addr is the start address - * @param[in] *data points to a data buffer - * @param[in] len is the data length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] addr start address + * @param[in] *data pointer to a data buffer + * @param[in] len data length * @return status code * - 0 success * - 1 write segment failed @@ -281,8 +281,8 @@ uint8_t tm1638_write_segment(tm1638_handle_t *handle, uint8_t addr, uint16_t *da /** * @brief read segment - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *segk points to a segk buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *segk pointer to a segk buffer * @return status code * - 0 success * - 1 read segment failed @@ -294,8 +294,8 @@ uint8_t tm1638_read_segment(tm1638_handle_t *handle, uint8_t segk[4]); /** * @brief set pulse width - * @param[in] *handle points to a tm1638 handle structure - * @param[in] width is the pulse width + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] width pulse width * @return status code * - 0 success * - 1 set pulse width failed @@ -307,8 +307,8 @@ uint8_t tm1638_set_pulse_width(tm1638_handle_t *handle, tm1638_pulse_width_t wid /** * @brief get pulse width - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *width points to a pulse width buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *width pointer to a pulse width buffer * @return status code * - 0 success * - 2 handle is NULL @@ -319,8 +319,8 @@ uint8_t tm1638_get_pulse_width(tm1638_handle_t *handle, tm1638_pulse_width_t *wi /** * @brief enable or disable display - * @param[in] *handle points to a tm1638 handle structure - * @param[in] enable is a bool value + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] enable bool value * @return status code * - 0 success * - 1 set display failed @@ -332,8 +332,8 @@ uint8_t tm1638_set_display(tm1638_handle_t *handle, tm1638_bool_t enable); /** * @brief get display status - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *enable points to a bool value buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *enable pointer to a bool value buffer * @return status code * - 0 success * - 2 handle is NULL @@ -344,8 +344,8 @@ uint8_t tm1638_get_display(tm1638_handle_t *handle, tm1638_bool_t *enable); /** * @brief set address mode - * @param[in] *handle points to a tm1638 handle structure - * @param[in] mode is the address mode + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] mode address mode * @return status code * - 0 success * - 1 set address mode failed @@ -357,8 +357,8 @@ uint8_t tm1638_set_address_mode(tm1638_handle_t *handle, tm1638_address_mode_t m /** * @brief get address mode - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *mode points to an address mode buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *mode pointer to an address mode buffer * @return status code * - 0 success * - 2 handle is NULL @@ -369,8 +369,8 @@ uint8_t tm1638_get_address_mode(tm1638_handle_t *handle, tm1638_address_mode_t * /** * @brief enable or disable test mode - * @param[in] *handle points to a tm1638 handle structure - * @param[in] enable is a bool value + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] enable bool value * @return status code * - 0 success * - 1 set test mode failed @@ -382,8 +382,8 @@ uint8_t tm1638_set_test_mode(tm1638_handle_t *handle, tm1638_bool_t enable); /** * @brief get test mode status - * @param[in] *handle points to a tm1638 handle structure - * @param[out] *enable points to a bool value buffer + * @param[in] *handle pointer to a tm1638 handle structure + * @param[out] *enable pointer to a bool value buffer * @return status code * - 0 success * - 2 handle is NULL @@ -405,10 +405,10 @@ uint8_t tm1638_get_test_mode(tm1638_handle_t *handle, tm1638_bool_t *enable); /** * @brief set the chip register - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the send command - * @param[in] *data points to a data buffer - * @param[in] len is the data buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd sent command + * @param[in] *data pointer to a data buffer + * @param[in] len data buffer length * @return status code * - 0 success * - 1 write failed @@ -420,10 +420,10 @@ uint8_t tm1638_set_reg(tm1638_handle_t *handle, uint8_t cmd, uint8_t *data, uint /** * @brief get the chip register - * @param[in] *handle points to a tm1638 handle structure - * @param[in] cmd is the send command - * @param[out] *data points to a data buffer - * @param[in] len is the data buffer length + * @param[in] *handle pointer to a tm1638 handle structure + * @param[in] cmd sent command + * @param[out] *data pointer to a data buffer + * @param[in] len data buffer length * @return status code * - 0 success * - 1 read failed diff --git a/test/driver_tm1638_read_test.c b/test/driver_tm1638_read_test.c index fe787b5..0f77c7f 100644 --- a/test/driver_tm1638_read_test.c +++ b/test/driver_tm1638_read_test.c @@ -41,7 +41,7 @@ static tm1638_handle_t gs_handle; /**< tm1638 handle */ /** * @brief read test - * @param[in] times is the test times + * @param[in] times test times * @return status code * - 0 success * - 1 test failed diff --git a/test/driver_tm1638_read_test.h b/test/driver_tm1638_read_test.h index ccb5213..8133efc 100644 --- a/test/driver_tm1638_read_test.h +++ b/test/driver_tm1638_read_test.h @@ -50,7 +50,7 @@ extern "C"{ /** * @brief read test - * @param[in] times is the test times + * @param[in] times test times * @return status code * - 0 success * - 1 test failed