for connected embedded systems
![]() |
![]() |
![]() |
pin
Display PCMCIA information (QNX)
Syntax:
pin [-n node] [-s socket] [command]
Options:
- -n node
- Display information about the PCMCIA server running on the specified node.
- -s socket
- Display information about this PCMCIA socket only (starting at 1)
- command
- The type of information to display:
Command Description status Show status of each socket (default) resources Show port, IRQ and memory resources config Attempt to make configuration file entries cis Decode CIS on card clear Clear all resource tables on server file Cause server to reread configuration files translate file Make configuration file entries from CIS on standard input or file tuples file Decode CIS from standard input or file
Description:
The pin utility displays useful information about PCMCIA resources, servers and cards, and can also be used to create configuration file entries for PCMCIA cards (these entries must often be "tweaked" by hand -- see the Pcmcia.* PCMCIA server documentation for details).
The QNX PCMCIA server will automatically configure PCMCIA I/O cards as they are inserted. It will also manage computer resources such as memory windows, ports and IRQs. Resources will be allocated as cards are inserted and then freed as cards are removed. Drivers that are PCMCIA-aware can be informed of card insertions and removals based upon the type of card. These drivers can then configure themselves to use the correct ports and IRQs. The PcmciaLaunch utility will automatically start drivers and pass them command-line arguments 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.
Each I/O card must contain a CIS (Card Information Structure) that describes the resources needed and the functions provided by the card. Unfortunately, many PCMCIA card manufacturers have provided incomplete or erroneous CIS data, and for these cards it is not possible to perform fully automatic configuration based solely upon the information provided by the card. For this reason the server maintains an internal database of configuration descriptions based upon the card name and manufacturer. When a card is inserted the server will retrieve the card name and manufacturer and then search the database for a matching entry. This entry contains information that the server can use to find an appropriate configuration for the card. These configuration entries are stored in the file /etc/config/pcmcia.cards, new entries may be added to match any cards that will be used. The pin utility can create these entries automatically, but they must often be manually edited due to deviations from or misinterpretations of the PCMCIA standard by some manufacturers.
Once an appropriate configuration has been found the server will set a configuration and allocate resources for the card. The server may also inform processes that a card has been inserted.
Creating I/O Configurations
The pin utility is invaluable for creating configuration entries for new I/O cards. The pin config command will attempt to create configuration entries for any cards currently installed. There are several situations that may require manual editing of the configuration file:
- The card does not have a valid function identification within the CIS. This will cause the generated configuration to have an invalid card type in the configuration lines. The type must be changed to reflect the actual card type.
- Some cards may require voltages other than 5V on the Vpp line. A vpp line will have to be added to the configuration entry.
- The configuration will have a register = 0,0x40,0x40 line to set the card to level interrupts. Some cards do not operate correctly with level interrupts and this line must be removed or commented out.
- The order of the configurations is incorrect. The server will attempt each configuration in the order it appears in the file. A different order may be desired in order to control the resources used by a card.
Several of the pin commands can be used to assist in creating configuration entries:
- pin cis can be used to check the generated configuration entry against the card CIS data.
- pin tuples may be used to read a CIS from the standard input or a file
- pin translate will generate a configuration entry from a CIS from a file or standard input
Exit status:
- >0
- Failed
- 0
- Success
See also:
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Next]](../next.gif)