gpio toggle works

This commit is contained in:
tkl
2016-08-15 22:25:35 +02:00
parent 067dd1d3e5
commit 073f5093dd
16 changed files with 99 additions and 593 deletions

View File

@@ -20,15 +20,18 @@ enum driver_type {
DRIVER_TYPE_UART
};
#pragma pack(push)
#pragma pack(1)
struct driver {
enum driver_type driver_type;
const void *device_driver;
};
#pragma pack(pop)
int open(const struct driver *driver);
int close(const struct driver *driver);
int read(const struct driver *driver, char *buffer, int len);
int write(const struct driver *driver, const char *buffer, int len);
int ioctl(const struct driver *driver, unsigned int cmd, const void *data);
int drv_open(const struct driver *driver);
int drv_close(const struct driver *driver);
int drv_read(const struct driver *driver, char *buffer, int len);
int drv_write(const struct driver *driver, const char *buffer, int len);
int drv_ioctl(const struct driver *driver, unsigned int cmd, const void *data);
#endif /* SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_DRIVER_H_ */