module ti.sysbios.family.arm.ducati.dm8148.IntMux |
|
IntMux Module
Below is an example of how to override the default mapping of
interrupt 42 so that it is sourced by I2CINT2 rather than its
default mapping to I2CINT1:
[
more ... ]
#include <ti/sysbios/family/arm/ducati/dm8148/IntMux.h>
Functions |
Void | |
Functions common to all target modules |
|
|
Constants |
| |
| |
extern const Ptr | |
DETAILS
Below is an example of how to override the default mapping of
interrupt 42 so that it is sourced by I2CINT2 rather than its
default mapping to I2CINT1:
#include <ti/sysbios/family/arm/m3/Hwi.h>
#include <ti/sysbios/family/arm/ducati/dm8148/IntMux.h>
Void myI2CINT2Handler(UArg arg)
{
System_printf("I2CINT2 arg = %d\n", (UInt)arg);
}
Int main(Int argc, Char* argv[])
{
Hwi_Params params;
Hwi_Params_init(¶ms);
// set IntMux 19 to event number 4 (I2CINT2)
IntMux_setEvent(19, 4);
// create a corresponding interrupt handler
// notice that Ducati interrupt number 42 corresponds to IntMux 19
params.arg = 42; // pass the Int number to the handler for demo
Hwi_create(42, myI2CINT2Handler, ¶ms, NULL);
BIOS_start();
return (0);
}
Here is how you would define the same interrupt handler statically
in a configuration script:
var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
var IntMux = xdc.useModule('ti.sysbios.family.arm.ducati.dm8148.IntMux');
IntMux.setEventMeta(19, 4);
var hwiParams = new Hwi.Params();
hwiParams.arg = 42;
Program.global.staticHwi = Hwi.create(42, '&myI2CINT2Handler', hwiParams);
Calling Context
Function | Hwi | Swi | Task | Main | Startup |
setEvent | 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. Mod_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. Mod_Module_startupDone() returns FALSE).
|
config IntMux_A_badEventNum // module-wide |
|
Assert if event number > 47
config IntMux_A_badIntNum // module-wide |
|
Assert if interrupt number > 56
config IntMux_intMuxBaseAddr // module-wide |
|
Address of "DUCATI_INTMUX_0_3" register
extern const Ptr IntMux_intMuxBaseAddr;
IntMux_setEvent() // module-wide |
|
Set the event number associated with an interrupt
Void IntMux_setEvent(UInt intMuxNum, UInt eventNum);
ARGUMENTS
intNum
The intMux number (0-56)
eventNum
The event number (0-47)
DETAILS
Dynamically sets the event number associated with
an interrupt in the Ducati Interrupt Mux as described
in section 5.9.2 of the Centaurus Architecture Spec.
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool IntMux_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool IntMux_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 IntMux_Module_getMask();
// Returns the diagnostics mask for this module
Void IntMux_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var IntMux = xdc.useModule('ti.sysbios.family.arm.ducati.dm8148.IntMux');
module-wide config parameters
msg: "A_badIntNum: eventNum must be <= 47"
};
msg: "A_badIntNum: intNum must be <= 56"
};
module-wide functions
generated on Tue, 14 Feb 2017 19:59:28 GMT