![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_157.png)
29-4
InteInterrupt Handling Tools
Programmer’s Manual
Parameter
Return Value
29.3
IrptRequest
Syntax
U32
IrptRequest
(U32 handlerFlag)
Description
This tool is used by the application task to request the services of the interrupt
handlers. Once requested and granted, all interrupt messages sent from the
handlers are directed to the application with the appropriate interrupt
identifiers.
When calling this tool, the user must specify which of the handlers it wishes to
request. The interrupt flags can be OR
’ed together to request more than one
handler with a single call. If the requested handlers are installed and available,
PPSM system will hook the handlers to the application; if not, PPSM will do
nothing.
The return value from this tool is a 16-bit word, returning the flags of the
handlers that have been granted, if any. It uses the same format as the input
handler flag parameter. For example, if a caller makes a request for a specific
set of handlers, and if all are granted, then the return value from the tool will be
the same as the input handler flag parameter. If any one of the requested
handlers cannot be granted, the return value will be different from the input flag
parameter. If none is granted, a zero is returned.
Name
Description
handlerFlag
Flag to indicate which of the handler the
caller is releasing.
IRPT_SPIM_FLAG
IRPT_SPIS_FLAG(DragonBall Only)
IRPT_UART_FLAG
IRPT_IRQ1_FLAG
IRPT_IRQ2_FLAG
IRPT_IRQ3_FLAG
IRPT_IRQ6_FLAG
IRPT_INT_FLAG
IRPT_WDOG_FLAG
IRPT_PWM_FLAG
IRPT_USER_FLAG
Name
Description
PPSM_OK
Successful operation
PPSM_ERR_RELEASE
Unable to release handler
Personal Portable System Manager
Programmer’s Manual
29-1
Chapter 29 Interrupt Handling Tools
29.1
IrptGetData
Syntax
STATUS
IrptGetData
Description
This tool reads the application’s interrupt buffer for any pending interrupt
message. The interrupt source of the message and data collected from the
interrupt handler is returned. Each application has its own unique interrupt
buffer.
The data returned from this routine depends on the nature of the interrupt type.
Different messages from different interrupt sources represent different types of
data. The pre-defined format for the data generated by system interrupts are
listed below. The size of the data collected during an interrupt event is returned
in the last argument
size
. It is in number of byte.
PPSM does not impose any format or protocol for message data generated
from User Defined handlers since such data is programmable by the system
integrator.
Parameter
Return Value
*sData
*(*data)
*size
IRPT_AUDIO
N/A
U16 -
AUDIO_STOP_WAVE or
AUDIO_STOP_TONE
2
IRPT_HWR
N/A
U16, .... - List of candidates
2 x no. of
candidat
es
IRPT_ICON
U32 - AreaId
U16 -
PPSM_ICON_TOUCH or
PPSM_ICON_DRAG or
PPSM_ICON_PEN_UP or
PPSM_ICON_DRAG_UP
2
IRPT_INPUT_
STATUS
U32 - AreaId
U16 -
PPSM_INPUT_TOUCH or
PPSM_INPUT_DRAG or
PPSM_INPUT_PEN_UP or
PPSM_INPUT_DRAG_UP
2
IRPT_KEY
N/A
TEXT, S16, S16 - keycode, (x, y)
6
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.