summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-08-18 19:24:58 +0800
committerGitHub <[email protected]>2021-08-18 19:24:58 +0800
commitd71e2ac5829925e8a9fc7203fda8830eeda44ecc (patch)
treeac551ac3dd2a98fae1ad164cf9a6b42c551e65a9
parent69cd36b5d0719379be570c6ceca508c95c873de7 (diff)
parent3e6578916f892e4456d9dff4bbd44590a0cb4bc8 (diff)
Merge pull request #4484 from mysterywolf/security
[kernel][devices] add security devices
-rw-r--r--components/drivers/watchdog/watchdog.c2
-rw-r--r--components/finsh/cmd.c1
-rw-r--r--include/rtdef.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/components/drivers/watchdog/watchdog.c b/components/drivers/watchdog/watchdog.c
index 9108d834c6..d26626863d 100644
--- a/components/drivers/watchdog/watchdog.c
+++ b/components/drivers/watchdog/watchdog.c
@@ -89,7 +89,7 @@ rt_err_t rt_hw_watchdog_register(struct rt_watchdog_device *wtd,
device = &(wtd->parent);
- device->type = RT_Device_Class_Miscellaneous;
+ device->type = RT_Device_Class_Security;
device->rx_indicate = RT_NULL;
device->tx_complete = RT_NULL;
diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c
index 5f0bbb6d59..fd08246fa5 100644
--- a/components/finsh/cmd.c
+++ b/components/finsh/cmd.c
@@ -822,6 +822,7 @@ static char *const device_type_str[] =
"Sensor Device",
"Touch Device",
"Phy Device",
+ "Security Device",
"Unknown"
};
diff --git a/include/rtdef.h b/include/rtdef.h
index dac345f26d..278676bcef 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -34,6 +34,7 @@
* 2019-12-20 Bernard change version number to v4.0.3
* 2020-08-10 Meco Man add macro for struct rt_device_ops
* 2020-10-23 Meco Man define maximum value of ipc type
+ * 2021-03-19 Meco Man add security devices
* 2021-05-10 armink change version number to v4.0.4
*/
@@ -920,6 +921,7 @@ enum rt_device_class_type
RT_Device_Class_Sensor, /**< Sensor device */
RT_Device_Class_Touch, /**< Touch device */
RT_Device_Class_PHY, /**< PHY device */
+ RT_Device_Class_Security, /**< Security device */
RT_Device_Class_Unknown /**< unknown device */
};