[Previous] [Contents] [Next]

PcmciaLaunch

Automatically start drivers when PCMCIA cards are plugged in (QNX)

Syntax:

PcmciaLaunch [-v] 'type,command'...

Options:

-v
Display verbose messages to the standard output.
'type,command'
For this PCMCIA card type, spawn the command. Types may be specified in decimal (nnnn) or hexadecimal (0xnnn), and are followed by a comma (,) and the command to execute. e.g. '0x601,Net.ether1000 -p$IOPORT -i$IRQ'. Multiple type/command pairs may be specified on the command line separated by white space. If the command specified contains white space, the command must be enclosed in quotes (as shown).

Description:

The PcmciaLaunch utility automatically starts drivers and sets environment variables describing the ports and IRQs used by a card, thus permitting a non-PCMCIA-aware driver to be automatically started when a card is inserted and stopped when removed. The environment variables may be named in the command lines for the drivers to be run, thus allowing the port and IRQ information to be passed on the command line to the drivers, most of which will not be aware of the environment variables set by PcmciaLaunch.

PcmciaLaunch will both start drivers when cards are plugged in and stop them via SIGTERM when cards are removed.

When a card is plugged in, PcmciaLaunch will check the card type against the list of card types/driver commands supplied to it on its command line. If it does not know about the card type, it does nothing. If it has been provided with a command for the card type, it does the following:

When the card is removed, PcmciaLaunch unlocks the card and signals the previously spawned process with SIGTERM. The environment variables set by PcmciaLaunch are:

Envar Specifies
IOPORT Hex address of I/O port (e.g. 320)
IOPORTSZ Size of I/O port (e.g. 32)
IOPORT2 Hex address of second I/O port if assigned
IOPORT2SZ Size of second I/O port if assigned
IRQ IRQ of device
DMA DMA level if assigned
SOCKET The PCMCIA socket where the card is inserted

Examples:

Automatically start the Net.ether1000 driver with the appropriate I/O port and IRQ settings, for PCMCIA card type 0x601:

    PcmciaLaunch '0x601,Net.ether1000 -p$IOPORT -i$IRQ'

Exit status:

The PcmciaLaunch manager does not normally exit. If supplied with invalid command-line parameters, it will write a diagnostic message to the standard error and will exit with a non-zero exit status.

See also:

Pcmcia.*, pcmciatrap, pin


[Previous] [Contents] [Next]