33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
#ifndef __HMMMMM__
|
|
#define __HMMMMM__
|
|
#include "libhmmmm.h"
|
|
#include "config.h"
|
|
|
|
typedef struct {
|
|
void* (*extractPcounterPtr)(device_public_context_t* devContext);
|
|
|
|
size_t (*extractPcounter)(device_public_context_t* devContext);
|
|
size_t (*extractOpcode)(device_mem_t* devMem, size_t _programCounter);
|
|
uint8_t (*extractPcounterSizeWords)();
|
|
|
|
|
|
} instruction_simul_handlers_t;
|
|
|
|
typedef struct {
|
|
uint8_t devType;
|
|
device_public_context_t* (*init)(void*, char* errbuf);
|
|
uint8_t (*makeDeviceTick)(device_public_context_t* devInfo);
|
|
void* extendedHandlers;
|
|
device_public_context_t* devContext;
|
|
void* _dlhandl;
|
|
void* (*parseSpecsFromConfig)(const conf_dev_t* devConf, char* errbuf);
|
|
void (*freeSpecs)(void* specs);
|
|
void (*freeDevMem)(device_mem_t* mem);
|
|
void (*fillSmartReadSpecs)(void* specs, smart_read_spec_t* smartReadSpecs, uint64_t smartReadSpecsCount);
|
|
void (*fillSmartWriteSpecs)(void* specs, smart_write_spec_t* smartWriteSpecs, uint64_t smartWriteSpecsCount);
|
|
} device_lib_t;
|
|
|
|
device_lib_t* loadDeviceLib(const char *libpath, char* errbuf);
|
|
|
|
|
|
#endif // ifndef __HMMMMM__
|