The sdadmin device driver can control up to 8 Direct-Link cards. There are two requests that allow a task to access information and control each card individually. The SD_CARD_INFO and SD_RUN_Z80_HW requests provide access and control for each card. Both of these requests return SD_R_BAD_PARM if card_num is not between 0 and 7.
The SD_CARD_INFO request allows a task to retrieve data for a Direct-Link card. The card is specified in the card_num field within the sd_common structure. The information returned is defined in the SDRCARDINFO structure which contains the common return information followed by eleven fields: initialized, base_addr, io_base, vector, station, slot, timeout, duplicates, diagnostics, baud_rate and sd2_card. Unless an invalid card is specified, the result is SD_R_OK.
The returned structure contains the following fields:
A flag to indicate that the card has been successfully loaded. 0 - card not loaded, non-zero - module ID byte (see below).
A significant byte of the card memory address, e.g. 0xD8 for address 0xD8000.
The I/O address in hex.
The interrupt number used.
The Data Highway station address set for this card.
The slot number (1 to 8) for a Micro Channel card.
The timeout set in 1/4 seconds for this card. 0 indicates no timeout used.
If non-zero, duplicate checking is turned on for the card.
If non-zero, the card responds to diagnostic messages.
0=default, 1=lowest supported baud rate, 2=next supported baud rate, etc.
If non-zero, the card is Revision 2.
The terminal name of the node.
Module ID byte: The upper nibble contains the module type, 0xa0 for Data Highway Plus, or 0x50 for Data Highway.
The lower nibble contains the card type.
When sdadmin receives the SD_RUN_Z80_HW request, it allows the card specified in the card_num field within the sd_common structure to begin execution. This is normally performed by the sdload program and should not have to be repeated. The return value is either SD_R_Z80_FAIL or SD_R_OK if successful.
Neither the request nor the response takes extra parameters.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.