Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 91

Controller module
Table of Contents

Advertisement

CCPU_EntryInt
This function registers a routine to be called when an interrupt occurs.
Format
short CCPU_EntryInt (short sSINo, CCPU_FUNCPTR pFuncPtr)
Argument
Argument
Name
sSINo
Interrupt pointer number
pFuncPtr
Registered routine
• The data type of the registered routine (pFuncPtr) is defined as void type in the header file, "CCPUFunc.h".
The specification method for the interrupt pointer number (sSINo) is as follows:
sSINo
Description
0 to 15
Interrupt by module
44
Inter-module synchronization interrupt
45
Multiple CPU synchronization interrupt
50 to 1023
Interrupt by module
Description
• This function registers the routine specified to the registered routine (pFuncPtr) in the interrupt specified with interrupt
pointer number (sSINo).
• When NULL is specified to the registered routine (pFuncPtr), the routine is deregistered.
• Use the CCPU_EnableInt function to enable the routine registered with the CCPU_EntryInt function.
Otherwise, the routine will not be called.
Precautions
• The registered routine is not executed while the operating system is in the interrupt-disabled state.
• For processing a routine to be registered in the registered routine (pFuncPtr), note the following:
A routine to be registered must not have an argument. (Do not pass an argument from an interrupt.)
When registering a routine, observe the considerations on the interrupt service routine (ISR).
Register minimal processing of a routine so that the processing time is as short as possible.
Only the C Controller module dedicated function for ISR can be used for a routine to be registered. Do not use any other
function. (An error of a function to be registered is not checked.)
• When the CCPU_EntryInt function is executed multiple times by specifying the same interrupt pointer number (sSINo), the
routine specified to the registered routine (pFuncPtr) last is registered. (Multiple routines cannot be registered.)
• The routine is disabled after the registration is done by this function.
• Calling an interrupt from other CPUs, a multiple CPU synchronization interrupt, and a WDT error interrupt is delayed while
the routine registered with the CCPU_EntryInt function is in operation.
Description
Specify the interrupt pointer number.
Specify a routine to be registered.
(The routine is deregistered by specifying NULL.)
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
IN
89

Advertisement

Table of Contents
loading

Table of Contents