![background image](http://html1.mh-extra.com/html/carrol-touch/touchsystems-carrolltouch-prog/touchsystems-carrolltouch-prog_programmers-manual_2564265193.webp)
Appendix C - TAPI Function Reference
CARROLL TOUCH
C-14
Touch System Programmer’s Guide
SetUserEventHandler (7)
Description
This function lets you install a user event handler (UEH) subroutine
that is called whenever a report is available from the driver. This lets a
user application receive reports from the TAPI driver using an interrupt
method rather than a polling method. The UEH subroutine should end
with a normal return instruction, not a return from interrupt instruction.
Once a UEH has been installed and enabled, execution of the user
program is halted and the event handler subroutine is called whenever
the TAPI driver has a report to be sent to the user, as long as the bit in
the event mask that corresponds to the type of report is set.
When the UEH is called, the CPU registers contain the following:
BX
=
Segment of the TAPI driver’s internal report buffer.
CX
=
Number of report bytes available for transfer.
DX
=
Offset of the TAPI driver’s internal report buffer.
The UEH may then read report bytes from the buffer, up to the number
of bytes in
CX
. Any bytes read from the buffer beyond the value passed
in
CX
are invalid. The UEH must not write to the buffer.
When the event handler subroutine returns, it must load
AX
as follows:
AX
= 0
=
Leave the TAPI driver’s internal report
buffer intact.
AX
= Nonzero =
Clear the TAPI driver’s internal report
buffer.
The execution of the user program then continues at the point at which
it was interrupted.
Call with
AX
= 7 (function number).
BH
= Event mask.
Bit 0= If 1, call handler on all coordinate reports.
Bit 1= If 1, call handler on all non-coordinate reports.
BH:
X
X
7
6
5
4
3
2
1
0
Содержание TouchSystems CarrollTouch Prog
Страница 1: ...CARROLL TOUCH TOUCH PRODUCTS an company AMP Touch System Programmer s Guide ...
Страница 11: ...Table of Contents CARROLL TOUCH viii ...
Страница 13: ...Table of Contents CARROLL TOUCH x ...
Страница 17: ...Welcome CARROLL TOUCH xiv Touch System Programmer s Guide ...
Страница 25: ...Chapter 1 Introduction to Infrared Touch Systems CARROLL TOUCH 1 8 Touch System Programmer s Guide ...
Страница 29: ...Chapter 2 Introduction to Guided Wave Touch Systems CARROLL TOUCH 2 4 Touch System Programmer s Guide ...
Страница 41: ...Chapter 3 General Programming Issues CARROLL TOUCH 3 12 Touch System Programmer s Guide ...
Страница 57: ...Chapter 4 Smart Frame Protocol CARROLL TOUCH 4 16 Touch System Programmer s Guide ...
Страница 87: ...Chapter 6 Touch Application Program Interface TAPI CARROLL TOUCH 6 10 Touch System Programmer s Guide ...
Страница 149: ...Appendix A Smart Frame Protocol Command Reference CARROLL TOUCH A 40 Touch System Programmer s Guide ...
Страница 179: ...Appendix B Smart Frame Protocol II Function Reference CARROLL TOUCH B 30 Touch System Programmer s Guide ...
Страница 237: ...Appendix D CTKERN Function Reference CARROLL TOUCH D 42 Touch System Programmer s Guide ...