46bb1d3157
https://github.com/ozkl/soso + Much smaller than Linux; builds instantly + Supports graphics - No network support - Doesn't work on a cloud server (yet?)
25 lines
484 B
C
25 lines
484 B
C
#ifndef DEVICE_H
|
|
#define DEVICE_H
|
|
|
|
#include "common.h"
|
|
#include "fs.h"
|
|
|
|
typedef struct Device
|
|
{
|
|
char name[16];
|
|
FileType deviceType;
|
|
ReadWriteBlockFunction readBlock;
|
|
ReadWriteBlockFunction writeBlock;
|
|
ReadWriteFunction read;
|
|
ReadWriteFunction write;
|
|
OpenFunction open;
|
|
CloseFunction close;
|
|
IoctlFunction ioctl;
|
|
FtruncateFunction ftruncate;
|
|
MmapFunction mmap;
|
|
MunmapFunction munmap;
|
|
void * privateData;
|
|
} Device;
|
|
|
|
#endif // DEVICE_H
|