1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-06-26 19:29:33 +00:00
rk65c02/src/device.h
2017-02-20 12:31:26 +01:00

25 lines
414 B
C

#ifndef _DEVICE_H_
#define _DEVICE_H_
typedef struct device_t {
const char *name;
uint16_t size;
uint8_t (*read_1)(void *, uint16_t doff);
void (*write_1)(void *, uint16_t, uint8_t val);
void *config;
void *aux; /* any dev space-specific data */
} device_t;
typedef struct device_mapping_t {
device_t *dev;
uint16_t addr;
struct device_mapping_t *next;
} device_mapping_t;
#endif /* _DEVICE_H_ */