Expose storedevs to the outside world via dev interface

This commit is contained in:
2025-10-11 02:35:15 +02:00
parent 3996f71316
commit 6b0e05e506
18 changed files with 137 additions and 18 deletions

View File

@ -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;