module ti.sysbios.family.c64p.EventCombiner

Event Combiner Manager module

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 whichever system events they want. [ more ... ]
C synopsis target-domain sourced in ti/sysbios/family/c64p/EventCombiner.xdc
DETAILS
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 whichever system events they want.

Calling Context

Function Hwi Swi Task Main Startup
disableEvent Y Y Y Y Y
dispatch Y N N N N
dispatchPlug Y Y Y Y Y
enableEvent Y Y Y Y Y
Definitions:
  • Hwi: API is callable from a Hwi thread.
  • Swi: API is callable from a Swi thread.
  • Task: API is callable from a Task thread.
  • Main: API is callable during any of these phases:
    • In your module startup after this module is started (e.g. EventCombiner_Module_startupDone() returns TRUE).
    • During xdc.runtime.Startup.lastFxns.
    • During main().
    • During BIOS.startupFxns.
  • Startup: API is callable during any of these phases:
    • During xdc.runtime.Startup.firstFxns.
    • In your module startup before this module is started (e.g. EventCombiner_Module_startupDone() returns FALSE).
const EventCombiner_NUM_EVENTS

C64+ supports 128 events

C synopsis target-domain
#define EventCombiner_NUM_EVENTS (Int)128
typedef EventCombiner_FuncPtr

Event Combiner dispatcher function type definition

C synopsis target-domain
typedef Void (*EventCombiner_FuncPtr)(UArg);
config EventCombiner_EVTMASK  // module-wide

Holds the initialization values for the C64+ EVTMASK registers (0-3)

C synopsis target-domain
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

C synopsis target-domain
extern const Error_Id EventCombiner_E_unpluggedEvent;
EventCombiner_disableEvent()  // module-wide

Disables 'evt' from contributing to its combined event group

C synopsis target-domain
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

C synopsis target-domain
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'

C synopsis target-domain
Void EventCombiner_dispatchPlug(UInt evt, EventCombiner_FuncPtr fxn, UArg arg, Bool unmask);
DETAILS
The parameters correspond to the same ones for static configuration in EventObj. dispatchPlug does not map the corresponding 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

C synopsis target-domain
Void EventCombiner_enableEvent(UInt evt);
DETAILS
It accomplishes this by setting the corresponding bit in the C64+ EVTMASK array to 0 (to unmask it).
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId EventCombiner_Module_id();
// Get this module's unique id
 
Bool EventCombiner_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle EventCombiner_Module_heap();
// 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
 
XDCscript usage meta-domain sourced in ti/sysbios/family/c64p/EventCombiner.xdc
var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
module-wide constants & types
        obj.unmask = Bool  ...
        obj.fxn = Void(*)(UArg)  ...
        obj.arg = UArg  ...
module-wide config parameters
        msg: "E_unpluggedEvent: Event# %d is unplugged"
    };
module-wide functions
 
const EventCombiner.NUM_EVENTS

C64+ supports 128 events

XDCscript usage meta-domain
const EventCombiner.NUM_EVENTS = 128;
C SYNOPSIS
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;
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.
C SYNOPSIS
config EventCombiner.E_unpluggedEvent  // module-wide

Error raised when an unplug Event is executed

XDCscript usage meta-domain
EventCombiner.E_unpluggedEvent = Error.Desc {
    msg: "E_unpluggedEvent: Event# %d is unplugged"
};
C SYNOPSIS
metaonly config EventCombiner.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
EventCombiner.common$ = Types.Common$ undefined;
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
EventCombiner.events = EventCombiner.EventObj[EventCombiner.NUM_EVENTS] undefined;
DETAILS
Array elements can be configured in the program configuration script.
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].
generated on Thu, 05 May 2011 22:42:13 GMT