beautypg.com

Comtrol API (6508) for the MS-DOS User Manual

Page 28

background image

28

API Functions

aaInstallMdmChgEvent

aaInstallMdmChgEvent

Installs an application level event function to handle
modem change events.

aaInstallMdmChgEvent(EvFuncP)
void (*evFuncP
)(Dev,unsigned char MdmChange,

unsigned char MdmState)

Ptr to the event

function

void

See the EvModemChange() function for a description of
the event function.

The function installed here is called during an
interrupt service routine (ISR). Keep your code short
and remember that many standard C library calls do
not work in ISRs, such as printf().

If using the Microsoft C compiler, stack checking must
be disabled during the event function and any functions
called by the event function.
Stack checking can be turned off and on with:

#pragma check_stack(off)
#pragma check_stack(on)

Function

Purpose

Call

Return

Comments

Warning

aaInstallPeriodicEvent

Installs a periodic application level event function.

aaInstallPeriodicEvent(EvFuncP)
void (*EvFuncP
)(void)

Ptr to the event function.

void

The periodic event function is called 274 times a
second. Once installed, the periodic event function is
not dispatched until it is enabled with
aaEnPeriodicEvent(). The aaEnPeriodicEvent() function
can also be used to disable dispatching of the periodic
event function.
See the EvPeriodic() function for a description of the
event function.

The function installed here will be called during an
interrupt service routine (

ISR

). Keep your code short

and remember that many standard C library calls do
not work in

ISR

s, such as printf().

If using the Microsoft C compiler, stack checking must
be disabled during the event function and any functions
called by the event function.
Stack checking can be turned off and on with:

#pragma check_stack(off)

#pragma check_stack(on)

Function

Purpose

Call

Return

Comments

Comments

Warning