Expose storedevs to the outside world via dev interface
This commit is contained in:
@ -6,13 +6,16 @@
|
||||
|
||||
#define DEV_FNS_MAX 32
|
||||
|
||||
typedef int32_t (*DevFn)(uint8_t *buffer, size_t len, void *extra);
|
||||
struct Dev;
|
||||
|
||||
typedef struct {
|
||||
typedef int32_t (*DevFn)(struct Dev *dev, uint8_t *buffer, size_t len, void *extra);
|
||||
|
||||
typedef struct Dev {
|
||||
int _hshtbstate;
|
||||
char ident[0x100];
|
||||
DevFn fns[DEV_FNS_MAX];
|
||||
SpinLock spinlock;
|
||||
void *extra;
|
||||
} Dev;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user