devices.h
来自「完整的Bell实验室的嵌入式文件系统TFS」· C头文件 代码 · 共 37 行
H
37 行
/* device structure: * This structure defines the basic information needed for device * control. The table of devices is initialized at compile time * with each device assigned an integer device descriptor. */struct device { int (*init)(unsigned long); int (*ctrl)(int,unsigned long,unsigned long); int (*open)(unsigned long,unsigned long); int (*close)(); int (*read)(char *,int); int (*write)(char *,int); char *name;};extern struct device devtbl[];/* Generic driver functions: */extern int open(int, unsigned long, unsigned long);extern int close(int);extern int read(int, char *, int);extern int write(int, char *, int);extern int init(int, unsigned long);extern int ioctl(int, int, unsigned long, unsigned long);extern int devInit(int);extern int isbaddev(int);extern void devtbldump(void);/* Common ioctl definitions: */#define INIT 1#define GOTACHAR 2#define SETBAUD 3#define nodriver 0extern int ConsoleDevice;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?