Académique Documents
Professionnel Documents
Culture Documents
CoDeSys V3.x
SysInt.library
CONTENT
1 OVERVIEW 3
2 LIBRARY MODULES 4
2.1 SysIntClose 4
2.2 SysIntDisable 4
2.3 SysIntDisableAll 4
2.4 SysIntEnable 4
2.5 SysIntEnableAll 5
2.6 SysIntLevel 5
2.7 SysIntOpen 5
2.8 SysIntOpenByName 5
2.9 SysIntRegister 6
2.10 SysIntUnregister 6
2.11 UNION BusSpecific 6
2.12 Structure IsaInterrupt 7
2.13 Structure PciInterrupt 7
2.14 Structure SYS_INT_MEANING 7
CHANGE HISTORY 8
tech_doc_e.doc / V1.2
1 Overview
Note: It depends on the target system, which system libraries can be used within the application.
Note: The use of this library is intended for writing drivers and requires a profound knowledge!
If supported by the target system, the following library functions are available:
SysIntClose
SysIntDisable
SysIntDisableAll
SysIntEnable
SysIntEnableAll
SysIntLevel
SysIntOpen
SysIntOpenByName
SysIntRegister
SysIntUnregister
The library functions make use of the following structures, enumerations and interfaces:
BusSpecific
IsaInterrupt
PciInterrupt
SYS_INT_MEANING
tech_doc_e.doc / V1.2
2 Library Modules
2.1 SysIntClose
This functions registers the interrupt being identified by its handle at the runtime system.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.2 SysIntDisable
By use of this function the interrupt specified by its handle gets deactivated (masked). An
interrupt call to a deactivated interrupt has no effect.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.3 SysIntDisableAll
By use of this functions all interrupts are deactivated (masked). The function is implemented
only for operating systems that allow this kind of deactivation. A call of SysIntDisableAll has to
be succeeded by a call to SysIntEnableAll.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.4 SysIntEnable
By use of this function the specified interrupt having been opened with SysIntOpen gets
enabled.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.5 SysIntEnableAll
A call to this function will be done after a call of function SysIntDisableAll and will restore the
situation preceding the execution of SysIntDisableAll. That means, all interrupts, having been
activated before the call to SysIntDisableAll are activated again, the others rest deactivated.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.6 SysIntLevel
This function checks if the processor is actually executing an ISR. This information is
necessary, as some functions of the operating system must not be called within the interrupt
mode.
2.7 SysIntOpen
By use of this function an interrupt is declared for the runtime system. Thereby, the interrupt is
identified by its number. An interrupt has to be declared before it can be registered
(SysIntRegister) and activated (SysIntEnable).
The return of type UDINT is a handle identifying the interrupt and used as input for other
library functions.
Input Variable Data type Description
2.8 SysIntOpenByName
By use of this function an interrupt is declared for the runtime system. Thereby, the interrupt is
identified by its name. An interrupt has to be declared before it can be registered
(SysIntRegister) and activated (SysIntEnable).
The return of type UDINT is a handle identifying the interrupt and used as input for other
library functions.
tech_doc_e.doc / V1.2
2.9 SysIntRegister
By use of this function an interrupt handler (Interrupt Service Routine, ISR) for the interrupt
specified by its handle gets registered. During registration, the start address of the function to
be executed in case of the associated interrupt request is filled into the vector table.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
2.10 SysIntUnregister
This function deletes the interrupt handler corresponding to the interrupt specified by its
handle from the vector table.
The return of type UDINT is an error message indicating whether the operation has been
executed successfully or not.
Input Variable Data type Description
Change History