[DM/FEATURE] DM Device IDA management

Drivers can manage their own IDs without having to concern
themselves with the register/unregister in system

Link: https://github.com/RT-Thread/rt-thread/issues/9534

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI
2024-11-18 14:23:25 +08:00
committed by Rbb666
parent 45aba1bcd7
commit 3b22dbd049
4 changed files with 247 additions and 0 deletions
+3
View File
@@ -1390,6 +1390,9 @@ struct rt_device
rt_uint16_t open_flag; /**< device open flag */
rt_uint8_t ref_count; /**< reference count */
#ifdef RT_USING_DM
rt_uint8_t master_id; /**< 0 - 255 */
#endif
rt_uint8_t device_id; /**< 0 - 255 */
/* device call back */