Semi-decennial update. 50% code inflation.
[cbaos.git] / include / driver.h
blob3af924c24ae8e8b77939c7cf1d5385162202a75d
1 #ifndef _DRIVER_H_
2 #define _DRIVER_H_
4 #include <stddef.h>
5 #include <ioctl.h>
7 struct device;
8 struct driver {
9 int (*probe)(struct device *, void *data);
10 void (*shutdown)(struct device *);
11 int (*open)(struct device *, int flags);
12 void (*close)(struct device *);
13 int (*read)(struct device *, void *, size_t);
14 int (*write)(struct device *, const void *, size_t);
15 int (*ioctl)(struct device *, enum ioctl, int arg);
18 #endif