LibDCPU16
hardware.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 struct dcpu;
6 
7 typedef struct dcpu* DCPU;
8 
9 struct hardware;
10 
11 typedef struct hardware* HARDWARE;
12 
18 typedef void(*hardware_hwq_handler)(DCPU dcpu, HARDWARE hardware);
19 
25 typedef void(*hardware_hwi_handler)(DCPU dcpu, HARDWARE hardware);
26 
32 typedef void(*hardware_tick_handler)(DCPU dcpu, HARDWARE hardware);
33 
38 typedef void(*hardware_reset_handler)(HARDWARE hardware);
39 
45 typedef void(*hardware_destroy_handler)(HARDWARE hardware);
46 
50 struct hardware
51 {
57 
59  void* state;
60 };
61 
hardware_reset_handler reset
Definition: hardware.h:55
struct hardware * HARDWARE
Definition: hardware.h:11
Definition: hardware.h:50
hardware_destroy_handler destroy
Definition: hardware.h:56
void(* hardware_tick_handler)(DCPU dcpu, HARDWARE hardware)
Definition: hardware.h:32
void(* hardware_hwq_handler)(DCPU dcpu, HARDWARE hardware)
Definition: hardware.h:18
void(* hardware_hwi_handler)(DCPU dcpu, HARDWARE hardware)
Definition: hardware.h:25
void * state
Definition: hardware.h:59
hardware_hwq_handler hwq
Definition: hardware.h:52
Definition: dcpu.c:177
hardware_hwi_handler hwi
Definition: hardware.h:53
struct dcpu * DCPU
Definition: hardware.h:7
void(* hardware_reset_handler)(HARDWARE hardware)
Definition: hardware.h:38
void(* hardware_destroy_handler)(HARDWARE hardware)
Definition: hardware.h:45
hardware_tick_handler tick
Definition: hardware.h:54