![]() |
RT-Thread RTOS
An open source embedded real-time operating system
|
#include <rtdef.h>
Data Fields | |
| struct rt_object | parent |
| enum rt_device_class_type | type |
| rt_uint16_t | flag |
| rt_uint16_t | open_flag |
| rt_uint8_t | ref_count |
| rt_uint8_t | device_id |
| rt_err_t(* | readlink )(rt_device_t dev, char *buf, int len) |
| void * | user_data |
Device structure
| enum rt_device_class_type rt_device::type |
device type
| rt_uint16_t rt_device::flag |
device flag
| rt_uint16_t rt_device::open_flag |
device open flag
| rt_uint8_t rt_device::ref_count |
reference count
| rt_uint8_t rt_device::device_id |
0 - 255
| rt_err_t(* rt_device::readlink) (rt_device_t dev, char *buf, int len) |
for dynamic device
| void* rt_device::user_data |
device private data