LibDCPU16
Classes | Typedefs
hardware.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  hardware
 

Typedefs

typedef struct dcpuDCPU
 
typedef struct hardwareHARDWARE
 
typedef void(* hardware_hwq_handler) (DCPU dcpu, HARDWARE hardware)
 
typedef void(* hardware_hwi_handler) (DCPU dcpu, HARDWARE hardware)
 
typedef void(* hardware_tick_handler) (DCPU dcpu, HARDWARE hardware)
 
typedef void(* hardware_reset_handler) (HARDWARE hardware)
 
typedef void(* hardware_destroy_handler) (HARDWARE hardware)
 

Typedef Documentation

typedef struct dcpu* DCPU
typedef struct hardware* HARDWARE
typedef void(* hardware_destroy_handler) (HARDWARE hardware)

The destroy handler is called when the

Parameters
hardwareis being destroyed. The handler is expected to free the state.
hardwareThe hardware instance.
typedef void(* hardware_hwi_handler) (DCPU dcpu, HARDWARE hardware)

The HWI handler is called whenever the

Parameters
dcpuencounters an HWI instruction targeting this device.
dcpuThe DCPU instance.
hardwareThe hardware instance.
typedef void(* hardware_hwq_handler) (DCPU dcpu, HARDWARE hardware)

The HWQ handler is called whenever the

Parameters
dcpuencounters an HWQ instruction targeting this device.
dcpuThe DCPU instance.
hardwareThe hardware instance.
typedef void(* hardware_reset_handler) (HARDWARE hardware)

The reset handler is called when the

Parameters
dcpuwants the device to be set to its default state.
hardwareThe hardware instance.
typedef void(* hardware_tick_handler) (DCPU dcpu, HARDWARE hardware)

The tick handler is called whenever the

Parameters
dcpuis ticked.
dcpuThe DCPU instance.
hardwareThe hardware instance.