Initial commit

This commit is contained in:
2025-01-21 22:03:23 +03:00
commit 2ff6b1a454
21 changed files with 2541 additions and 0 deletions

37
inc/libdevice.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef __LIBDEVICE_H__
#define __LIBDEVICE_H__
#include <stdint.h>
#include "libmem.h"
#define SMART_ADDR_TYPE_GLOBAL 1
#define SMART_ADDR_TYPE_SEGMENTED 2
typedef struct
{
uint64_t addr;
uint8_t segno;
uint64_t localAddr;
uint8_t addrType;
mem_h_read_func* handler;
uint64_t ident;
} smart_read_spec_t;
typedef struct
{
uint64_t addr;
uint8_t segno;
uint64_t localAddr;
uint8_t addrType;
mem_h_write_func handler;
uint64_t ident;
} smart_write_spec_t;
typedef struct {
device_mem_t* deviceMem;
void* deviceInfo;
} device_public_context_t;
#endif // ifndef __LIBDEVICE_H__