Owner manual

10 Developing Applications
* These are not part of the API, but are part of the application.
2.3. Writing the Configuration File
The configuration file is used by the aaInit() function to obtain information
about all the RocketPort controllers installed in the system. The aaInit()
function checks the
ROCKETCFG environment variable to determine the name
and path of this file.
When you installed the
API, the configuration file was created for you, and you
were instructed to place the following line in your AUTOEXEC.BAT file:
SET ROCKETCFG=filepath
where filepath is the complete path to the configuration file. This path is the
same path where the
API was installed.
The initial configuration file allows you to run the sample application program
(
TERM), but when you create and distribute your own application you may wish
to use a different configuration file.
The configuration file contains between two and five lines:
The first line gives the
IRQ number that is used by all RocketPort
controllers.
The second through fifth lines give the starting
I/O addresses for the first
through the fourth controllers
The first controller uses a 68-byte block of
I/O address space, subsequent
controllers use 64-byte blocks.
I/O address lines should be placed in the file only
for controllers that are actually installed in the system. Table2-2 summarizes
this information.
Each RocketPort controller uses up to three additional “alias”
I/O address
ranges located at 400h intervals above the address ranges described above.
For example, if the first controller is addressed at 100, the
I/O address ranges
used by that controller are:
100 - 143
500 - 543
aaInstallMdmChgEvent Installs an event function to
handle modem change events.
aaInstallPeriodicEvent Installs a periodic event function.
aaInstallRxEvent Installs an event function to
handle Rx data available events.
aaOpen Opens a device for reading or
writing, or both.
aaRead Reads serial data.
aaReadWithStatus Reads serial data and status.
aaReconfigure Reconfigures communication
parameters.
aaSendBreak Sends a break signal.
aaSetCloseDelay Sets the maximum aaClose()
transmit drain delay.
aaWrite Writes serial data.
EvModemChange* Modem control input change
event function.
EvPeriodic* Periodic event function.
EvRxData* Receive data available event
function.
Table 2-1.
API Functions (Continued)
Function Name Description
Table 2-2. Configuration File Parameters
Line
Number
Parameter Allowable Values
Block
Size
1
IRQ number 3, 4, 5, 9, 10, 11, 12,
15
NA
2 Ctrl 1 I/O 100, 140, 180, 1C0,
200, 240, 280, 2C0,
300, 340, 380
68 bytes
3 Ctrl 2
I/O 100, 140, 180, 1C0,
200, 240, 280, 2C0,
300, 340, 380
64 bytes
4 Ctrl 3
I/O 100, 140, 180, 1C0,
200, 240, 280, 2C0,
300, 340, 380
64 bytes
5 Ctrl 4
I/O 100, 140, 180, 1C0,
200, 240, 280, 2C0,
300, 340, 380
64 bytes