
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
GetIntrVector()
Description:
Get ISR (Interrupt Service Routine) entry point.
DAPAPI.H
Include:
ulong GetIntrVector (uchar
vector
)
Usage:
Input Parameters:
vector:
Return Value:
ISR (Interrupt Service Routine) entry point is the starting code
address of the routine. It is represented as a LONG data format. It
contains the “Segment” and “Offset” address of the entry point.
Example:
Get the entry point of 1ms timer interrupt
ulong isr_1ms
isr_1ms = GetIntrVector(0x7D)
Remarks:
Get the entry point of the interrupt vector specified by
vector
. This function is
generally used with
SetIntrVector
. To replace an interrupt, first save the
current vector entry point by
GetIntrVector,
then set the vector to your own
interrupt function with
SetIntrVector
. The saved vector can be restored if
needed.
System reserved interrupt vectors
Vector
Description
0x1C
1/18 second timer interrupt
0x7D
1ms timer interrupt
0x0C
the 1st RS-232/RS-485 communication interrupt
0x0D
the 2nd RS-232/RS-485 communication interrupt
0x80 ~ 0xFF
reserved for your application
target interrupt vector
Note: Because Interrupt Service Routine maybe disable hardware interrupt, please don’t spend too many
CPU time in interrupt routine.
SetIntrVector()
Description:
Set ISR (Interrupt Service Routine) entry point.
Include:
DAPAPI.H
Usage:
void SetIntrVector (uchar
vector,
farFUNC
isr
)
vector
target interrupt vector to replace
Input Parameters:
isr:
the entry point of ISR
Return Value:
None
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.