The event combiner allows the user to combine up to 32 system events
into a single combined event. The events 0, 1, 2, and 3 are the events
associated with the event combiner. Using the EventCombiner module
along with the Hwi module, allows the user to route a combined event
to any of the 12 maskable CPU interrupts available on GEM. The
EventCombiner supports up to 128 system events. Users can specify
a function and an argument for each system event and can choose to
enable which ever system events they want.
| const EventCombiner.NUM_EVENTS |
 |
C64+ supports 128 events
| XDCscript usage |
meta-domain |
const EventCombiner.NUM_EVENTS = 128;
#define EventCombiner_NUM_EVENTS (Int)128
| typedef EventCombiner.FuncPtr |
 |
Event Combiner dispatcher function type definition
typedef Void (*EventCombiner_FuncPtr)(UArg);
| metaonly struct EventCombiner.EventObj |
 |
Event Configuration Object
| XDCscript usage |
meta-domain |
var obj = new EventCombiner.EventObj;
obj.unmask = Bool ...
obj.fxn = Void(*)(UArg) ...
obj.arg = UArg ...
DETAILS
unmask - Boolean value that specifies if an event should be
unmasked in the C64+ EVTMASK registers.
fxn - function to call when this event occurs.
arg - arg to fxn.
| config EventCombiner.EVTMASK // module-wide |
 |
Holds the initialization values for the C64+ EVTMASK registers (0-3)
| XDCscript usage |
meta-domain |
EventCombiner.EVTMASK = Bits32[4] undefined;
extern const Bits32 EventCombiner_EVTMASK[4];
DETAILS
It is assigned values based on the 'unmask' member of the 'events'
configuration array. It can also be assigned manually in the program
configuration script.
| config EventCombiner.E_unpluggedEvent // module-wide |
 |
Error raised when an unplug Event is executed
| XDCscript usage |
meta-domain |
msg: "E_unpluggedEvent: Event# %d is unplugged"
};
extern const Error_Id EventCombiner_E_unpluggedEvent;
| metaonly config EventCombiner.common$ // module-wide |
 |
Common module configuration parameters
| XDCscript usage |
meta-domain |
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
| metaonly config EventCombiner.eventGroupHwiNum // module-wide |
 |
Configures the mapping of a C64+ combined event group to an interrupt
| XDCscript usage |
meta-domain |
EventCombiner.eventGroupHwiNum = Int[4] undefined;
DETAILS
There is one element per combined event group (0-3).
| metaonly config EventCombiner.events // module-wide |
 |
For holding configuration values for all C64+ events
| XDCscript usage |
meta-domain |
DETAILS
Array elements can be configured in the program
configuration script.
| EventCombiner.disableEvent( ) // module-wide |
 |
Disables 'evt' from contributing to its combined event group
Void EventCombiner_disableEvent( UInt evt );
DETAILS
It accomplishes this by setting the corresponding
bit in the C64+ EVTMASK array to 1 (to mask it).
| EventCombiner.dispatch( ) // module-wide |
 |
The Event Combiner dispatcher
Void EventCombiner_dispatch( UInt evt );
DETAILS
It is mostly used internally, but can be used directly by the user.
| EventCombiner.dispatchPlug( ) // module-wide |
 |
Used to configure a dispatcher entry for 'evt'
DETAILS
The parameters correspond to the same ones for static configuration
in EventObj. dispatchPlug does not map the corresonding combined
event group to an Hwi interrupt - such an action needs to be
performed either using the event combiner configuration or using the Hwi
module.
| EventCombiner.enableEvent( ) // module-wide |
 |
Enables 'evt' to contribute to its combined event group
Void EventCombiner_enableEvent( UInt evt );
DETAILS
It accomplishes this by setting the corresponding
bit in the C64+ EVTMASK array to 0 (to unmask it).
| metaonly EventCombiner.dispatchEventGroup( ) // module-wide |
 |
Configuration method for assigning the eventGroupHwiNum array
| XDCscript usage |
meta-domain |
EventCombiner.dispatchEventGroup( UInt evt, UInt hwiVec ) returns Void
DETAILS
It accomplishes the same thing as directly setting
eventGroupHwiNum[0-3].
| module-wide built-ins |
 |
// Get this module's unique id
Bool EventCombiner_Module_startupDone( );
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool EventCombiner_Module_hasMask( );
// Test whether this module has a diagnostics mask
Bits16 EventCombiner_Module_getMask( );
// Returns the diagnostics mask for this module
Void EventCombiner_Module_setMask( Bits16 mask );
// Set the diagnostics mask for this module