1 #pragma once
2 #include <filesystem/VFS/VFS.h>
3 
4 /**
5  * @brief devfs_private_file_info_t的type字段值
6  *
7  */
8 enum
9 {
10     DEV_TYPE_UNDEF = 0,
11     DEV_TYPE_CHAR = 1,
12     DEV_TYPE_USB,
13     DEV_TYPE_BLOCK,
14     DEV_TYPE_NET,
15     DEV_TYPE_BUS,
16 
17 };
18 
19 /**
20  * @brief 字符设备的sub_type字段值
21  *
22  */
23 enum
24 {
25     CHAR_DEV_STYPE_START = 0,
26     CHAR_DEV_STYPE_PS2_KEYBOARD = 1,
27     CHAR_DEV_STYPE_USB_KEYBOARD,
28     CHAR_DEV_STYPE_PS2_MOUSE,
29     CHAR_DEV_STYPE_USB_MOUSE,
30     CHAR_DEV_STYPE_BLUETOOTH_MOUSE,
31     CHAR_DEV_STYPE_BLUETOOTH_KEYBOARD,
32     CHAR_DEV_STYPE_TTY,
33     CHAR_DEV_STYPE_END, // 结束标志
34 };
35 
36 /**
37  * @brief 设备文件私有信息结构体
38  *
39  */
40 struct devfs_private_inode_info_t
41 {
42     uint16_t type;     // 设备主类型
43     uint16_t sub_type; // 设备子类型
44     struct vfs_file_operations_t *f_ops;
45     uint64_t uuid;
46     struct vfs_index_node_t * inode;    // 当前私有信息所绑定的inode
47 };
48