summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-05-28 16:20:08 +0800
committerGitHub <[email protected]>2021-05-28 16:20:08 +0800
commit92beddf3bccf6346e26aa097f82464456fb8e6bd (patch)
tree197e4a108118dda016ea02274172f0c40e7ee8ed /components/utilities
parentb18a99b44240ec3152011e159cc24a5af8dff0ce (diff)
parent03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff)
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/ulog/backend/console_be.c2
-rw-r--r--components/utilities/ulog/syslog/syslog.c2
-rw-r--r--components/utilities/ulog/syslog/syslog.h2
-rw-r--r--components/utilities/ulog/ulog.c2
-rw-r--r--components/utilities/ulog/ulog.h2
-rw-r--r--components/utilities/ulog/ulog_def.h8
-rw-r--r--components/utilities/utest/utest.c2
-rw-r--r--components/utilities/utest/utest.h60
-rw-r--r--components/utilities/utest/utest_assert.h10
-rw-r--r--components/utilities/utest/utest_log.h2
-rw-r--r--components/utilities/ymodem/ymodem.c2
11 files changed, 47 insertions, 47 deletions
diff --git a/components/utilities/ulog/backend/console_be.c b/components/utilities/ulog/backend/console_be.c
index 95dd547426..b84cd95d09 100644
--- a/components/utilities/ulog/backend/console_be.c
+++ b/components/utilities/ulog/backend/console_be.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ulog/syslog/syslog.c b/components/utilities/ulog/syslog/syslog.c
index 4c290bed52..a081db6eb6 100644
--- a/components/utilities/ulog/syslog/syslog.c
+++ b/components/utilities/ulog/syslog/syslog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ulog/syslog/syslog.h b/components/utilities/ulog/syslog/syslog.h
index 43eec7125f..8e4d5ba15f 100644
--- a/components/utilities/ulog/syslog/syslog.h
+++ b/components/utilities/ulog/syslog/syslog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ulog/ulog.c b/components/utilities/ulog/ulog.c
index 7610089298..757fa5276c 100644
--- a/components/utilities/ulog/ulog.c
+++ b/components/utilities/ulog/ulog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ulog/ulog.h b/components/utilities/ulog/ulog.h
index c78d72eda5..1fab86f389 100644
--- a/components/utilities/ulog/ulog.h
+++ b/components/utilities/ulog/ulog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ulog/ulog_def.h b/components/utilities/ulog/ulog_def.h
index de5e82fcc5..d1b276de7d 100644
--- a/components/utilities/ulog/ulog_def.h
+++ b/components/utilities/ulog/ulog_def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -102,8 +102,8 @@ extern "C" {
#define ulog_hex(TAG, width, buf, size) ulog_hexdump(TAG, width, buf, size)
#else
#define ulog_hex(TAG, width, buf, size)
-#endif /* (LOG_LVL >= LOG_LVL_DBG) && (ULOG_OUTPUT_LVL >= LOG_LVL_DBG) */
-
+#endif /* (LOG_LVL >= LOG_LVL_DBG) && (ULOG_OUTPUT_LVL >= LOG_LVL_DBG) */
+
/* assert for developer. */
#ifdef ULOG_ASSERT_ENABLE
#define ULOG_ASSERT(EXPR) \
@@ -142,7 +142,7 @@ extern "C" {
#define log_d LOG_D
#define log_v LOG_D
#define log_raw LOG_RAW
-#define log_hex LOG_HEX
+#define log_hex LOG_HEX
#define ELOG_LVL_ASSERT LOG_LVL_ASSERT
#define ELOG_LVL_ERROR LOG_LVL_ERROR
#define ELOG_LVL_WARN LOG_LVL_WARNING
diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c
index 6500ae2fbe..325823de8a 100644
--- a/components/utilities/utest/utest.c
+++ b/components/utilities/utest/utest.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/utest/utest.h b/components/utilities/utest/utest.h
index 8d83fa3184..6822c1a137 100644
--- a/components/utilities/utest/utest.h
+++ b/components/utilities/utest/utest.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -22,13 +22,13 @@ extern "C" {
/**
* utest_error
- *
+ *
* @brief Test result.
- *
+ *
* @member UTEST_PASSED Test success.
* @member UTEST_FAILED Test failed.
* @member UTEST_PASSED Test skipped.
- *
+ *
*/
enum utest_error
{
@@ -40,13 +40,13 @@ typedef enum utest_error utest_err_e;
/**
* utest
- *
+ *
* @brief utest data structure.
- *
+ *
* @member error Error number from enum `utest_error`.
* @member passed_num Total number of tests passed.
* @member failed_num Total number of tests failed.
- *
+ *
*/
struct utest
{
@@ -58,16 +58,16 @@ typedef struct utest *utest_t;
/**
* utest_tc_export
- *
+ *
* @brief utest testcase data structure.
* Will export the data to `UtestTcTab` section in flash.
- *
+ *
* @member name Testcase name.
* @member run_timeout Testcase maximum test time (Time unit: seconds).
* @member init Necessary initialization before executing the test case function.
* @member tc Total number of tests failed.
* @member cleanup Total number of tests failed.
- *
+ *
*/
struct utest_tc_export {
const char *name;
@@ -80,61 +80,61 @@ typedef struct utest_tc_export *utest_tc_export_t;
/**
* test_unit_func
- *
+ *
* @brief Unit test handler function pointer.
- *
+ *
*/
typedef void (*test_unit_func)(void);
/**
* utest_unit_run
- *
+ *
* @brief Unit test function executor.
* No need for the user to call this function directly
- *
+ *
* @param func Unit test function.
* @param unit_func_name Unit test function name.
- *
+ *
* @return void
- *
+ *
*/
void utest_unit_run(test_unit_func func, const char *unit_func_name);
/**
* utest_handle_get
- *
+ *
* @brief Get the utest data structure handle.
* No need for the user to call this function directly
- *
+ *
* @param void
- *
+ *
* @return utest_t type. (struct utest *)
- *
+ *
*/
utest_t utest_handle_get(void);
/**
* UTEST_NAME_MAX_LEN
- *
+ *
* @brief Testcase name maximum length.
- *
+ *
*/
#define UTEST_NAME_MAX_LEN (128u)
/**
* UTEST_TC_EXPORT
- *
+ *
* @brief Export testcase function to `UtestTcTab` section in flash.
* Used in application layer.
- *
+ *
* @param testcase The testcase function.
* @param name The testcase name.
* @param init The initialization function of the test case.
* @param cleanup The cleanup function of the test case.
* @param timeout Testcase maximum test time (Time unit: seconds).
- *
+ *
* @return None
- *
+ *
*/
#define UTEST_TC_EXPORT(testcase, name, init, cleanup, timeout) \
RT_USED static const struct utest_tc_export _utest_testcase \
@@ -149,14 +149,14 @@ utest_t utest_handle_get(void);
/**
* UTEST_UNIT_RUN
- *
+ *
* @brief Unit test function executor.
* Used in `testcase` function in application.
- *
+ *
* @param test_unit_func Unit test function
- *
+ *
* @return None
- *
+ *
*/
#define UTEST_UNIT_RUN(test_unit_func) \
utest_unit_run(test_unit_func, #test_unit_func); \
diff --git a/components/utilities/utest/utest_assert.h b/components/utilities/utest/utest_assert.h
index d83279272e..2e2007e773 100644
--- a/components/utilities/utest/utest_assert.h
+++ b/components/utilities/utest/utest_assert.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -30,10 +30,10 @@ void utest_assert_buf(const char *a, const char *b, rt_size_t sz, rt_bool_t equa
/**
* uassert_x macros
- *
+ *
* @brief Get the utest data structure handle.
* No need for the user to call this function directly.
- *
+ *
* @macro uassert_true if @value is true, not assert, means passing.
* @macro uassert_false if @value is false, not assert, means passing.
* @macro uassert_null if @value is null, not assert, means passing.
@@ -46,7 +46,7 @@ void utest_assert_buf(const char *a, const char *b, rt_size_t sz, rt_bool_t equa
* @macro uassert_buf_not_equal if @a not equal to @b, not assert, means passing. buf type test.
* @macro uassert_in_range if @value is in range of min and max, not assert, means passing.
* @macro uassert_not_in_range if @value is not in range of min and max, not assert, means passing.
- *
+ *
*/
#define uassert_true(value) __utest_assert(value, "(" #value ") is false")
#define uassert_false(value) __utest_assert(!(value), "(" #value ") is true")
@@ -62,7 +62,7 @@ void utest_assert_buf(const char *a, const char *b, rt_size_t sz, rt_bool_t equa
#define uassert_buf_equal(a, b, sz) utest_assert_buf((const char*)(a), (const char*)(b), (sz), RT_TRUE, __FILE__, __LINE__, __func__, "buf not equal")
#define uassert_buf_not_equal(a, b, sz) utest_assert_buf((const char*)(a), (const char*)(b), (sz), RT_FALSE, __FILE__, __LINE__, __func__, "buf equal")
-#define uassert_in_range(value, min, max) __utest_assert(((value >= min) && (value <= max)), "(" #value ") not in range("#min","#max")")
+#define uassert_in_range(value, min, max) __utest_assert(((value >= min) && (value <= max)), "(" #value ") not in range("#min","#max")")
#define uassert_not_in_range(value, min, max) __utest_assert(!((value >= min) && (value <= max)), "(" #value ") in range("#min","#max")")
#ifdef __cplusplus
diff --git a/components/utilities/utest/utest_log.h b/components/utilities/utest/utest_log.h
index 0403268351..6aa54386a8 100644
--- a/components/utilities/utest/utest_log.h
+++ b/components/utilities/utest/utest_log.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/utilities/ymodem/ymodem.c b/components/utilities/ymodem/ymodem.c
index 07055db615..8e4b04258f 100644
--- a/components/utilities/ymodem/ymodem.c
+++ b/components/utilities/ymodem/ymodem.c
@@ -13,7 +13,7 @@
#include <rthw.h>
#include "ymodem.h"
-#ifdef YMODEM_USING_CRC_TABLE
+#ifdef YMODEM_USING_CRC_TABLE
static const rt_uint16_t ccitt_table[256] =
{
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,