dcpu16/device.h

29 lines
520 B
C

#ifndef __DEVICE_H__
#include <stdint.h>
#include <stdbool.h>
#include <sys/time.h>
struct dev_entry {
uint32_t vendor;
uint32_t product;
uint16_t version;
char *name;
void (*irqh)();
void (*init)();
void (*free)();
void (*tick)();
};
extern struct dev_entry *iodevs[];
extern bool running, trace;
extern uint16_t ram[0x10000];
extern uint16_t ra, rb, rc, rx, ry, rz, ri, rj;
extern uint16_t rpc, rsp, rex, ria;
extern struct timeval time;
extern void intq_push(uint16_t v);
#endif