Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

csx_getstatus(9f) [opensolaris man page]

csx_GetStatus(9F)					   Kernel Functions for Drivers 					 csx_GetStatus(9F)

NAME
csx_GetStatus - return the current status of a PC Card and its socket SYNOPSIS
#include <sys/pccard.h> int32_t csx_GetStatus(client_handle_t ch, get_status_t *gs); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). gs Pointer to a get_status_t structure. DESCRIPTION
This function returns the current status of a PC Card and its socket. STRUCTURE MEMBERS
The structure members of get_status_t are: uint32_t Socket; /* socket number*/ uint32_t CardState; /* "live" card status for this client*/ uint32_t SocketState; /* latched socket values */ uint32_t raw_CardState; /* raw live card status */ The fields are defined as follows: Socket Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number. CardState The CardState field is the bit-mapped output data returned from Card Services. The bits identify what Card Services thinks the current state of the installed PC Card is. The bits are: CS_STATUS_WRITE_PROTECTED Card is write protected CS_STATUS_CARD_LOCKED Card is locked CS_STATUS_EJECTION_REQUEST Ejection request in progress CS_STATUS_INSERTION_REQUEST Insertion request in progress CS_STATUS_BATTERY_DEAD Card battery is dead CS_STATUS_BATTERY_DEAD Card battery is dead (BVD1) CS_STATUS_BATTERY_LOW Card battery is low (BVD2) CS_STATUS_CARD_READY Card is READY CS_STATUS_CARD_INSERTED Card is inserted CS_STATUS_REQ_ATTN Extended status attention request CS_STATUS_RES_EVT1 Extended status reserved event status CS_STATUS_RES_EVT2 Extended status reserved event status CS_STATUS_RES_EVT3 Extended status reserved event status CS_STATUS_VCC_50 5.0 Volts Vcc Indicated CS_STATUS_VCC_33 3.3 Volts Vcc Indicated CS_STATUS_VCC_XX X.X Volts Vcc Indicated The state of the CS_STATUS_CARD_INSERTED bit indicates whether the PC Card associated with this driver instance, not just any card, is inserted in the socket. If an I/O card is installed in the specified socket, card state is returned from the PRR (Pin Replacement Register) and the ESR (Extended Status Register) (if present). If certain state bits are not present in the PRR or ESR, a simulated state bit value is returned as defined below: CS_STATUS_WRITE_PROTECTED Not write protected CS_STATUS_BATTERY_DEAD Power good PCS_STATUS_BATTERY_LOW Power good CS_STATUS_CARD_READY Ready CS_STATUS_REQ_ATTN Not set CS_STATUS_RES_EVT1 Not set CS_STATUS_RES_EVT2 Not set CS_STATUS_RES_EVT3 Not set SocketState The SocketState field is a bit-map of the current card and socket state. The bits are: CS_SOCK_STATUS_WRITE_PROTECT_CHANGE Write Protect ECS_SOCK_STATUS_CARD_LOCK_CHANGE Card Lock Change CS_SOCK_STATUS_EJECTION_PENDING Ejection Request CS_SOCK_STATUS_INSERTION_PENDING Insertion Request CS_SOCK_STATUS_BATTERY_DEAD_CHANGE Battery Dead CS_SOCK_STATUS_BATTERY_LOW_CHANGE Battery Low CS_SOCK_STATUS_CARD_READY_CHANGE Ready Change CS_SOCK_STATUS_CARD_INSERTION_CHANGE Card is inserted The state reported in the SocketState field may be different from the state reported in the CardState field. Clients should normally depend only on the state reported in the CardState field. The state reported in the SocketState field may be different from the state reported in the CardState field. Clients should normally depend only on the state reported in the CardState field. raw_CardState The raw_CardState field is a Solaris-specific extension that allows the client to determine if any card is inserted in the socket. The bit definitions in the raw_CardState field are identical to those in the CardState field with the excep- tion that the CS_STATUS_CARD_INSERTED bit in the raw_CardState field is set whenever any card is inserted into the socket. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid. CS_BAD_SOCKET Error getting socket state. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CS_NO_CARD will not be returned if there is no PC Card present in the socket. CONTEXT
This function may be called from user or kernel context. SEE ALSO
csx_RegisterClient(9F) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.11 19 Jul 1996 csx_GetStatus(9F)
Man Page