Kernel Functions for Drivers csx_GetStatus(9F)
NAME
csx_GetStatus - return the current status of a PC Card and
its socketSYNOPSIS
#include
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 MEMBERSThe 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 out-
put 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
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csx_GetStatus(9F)
Card is write protectedCS_STATUS_CARD_LOCKED
Card is lockedCS_STATUS_EJECTION_REQUEST
Ejection request in progressCS_STATUS_INSERTION_REQUEST
Insertion request in progressCS_STATUS_BATTERY_DEAD
Card battery is deadCS_STATUS_BATTERY_DEAD
Card battery is dead (BVD1)CS_STATUS_BATTERY_LOW
Card battery is low (BVD2)CS_STATUS_CARD_READY
Card is READYCS_STATUS_CARD_INSERTED
Card is insertedCS_STATUS_REQ_ATTN
Extended status attention requestCS_STATUS_RES_EVT1
Extended status reserved event statusSunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csx_GetStatus(9F)
CS_STATUS_RES_EVT2
Extended status reserved event statusCS_STATUS_RES_EVT3
Extended status reserved event statusCS_STATUS_VCC_50
5.0 Volts Vcc IndicatedCS_STATUS_VCC_33
3.3 Volts Vcc IndicatedCS_STATUS_VCC_XX
X.X Volts Vcc IndicatedThe state of the CS_STATUS_CARD_INSERTED
bit indicates whether the PC Card associ-
ated with this driver instance, not just any card, is inserted in the socket. If anI/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
protectedCS_STATUS_BATTERY_DEAD Power good
PCS_STATUS_BATTERY_LOW Power good
CS_STATUS_CARD_READY Ready
CS_STATUS_REQ_ATTN Not set
SunOS 5.11 Last change: 19 Jul 1996 3
Kernel Functions for Drivers csx_GetStatus(9F)
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 ProtectECS_SOCK_STATUS_CARD_LOCK_CHANGE
Card Lock ChangeCS_SOCK_STATUS_EJECTION_PENDING
Ejection RequestCS_SOCK_STATUS_INSERTION_PENDING
Insertion RequestCS_SOCK_STATUS_BATTERY_DEAD_CHANGE
Battery DeadCS_SOCK_STATUS_BATTERY_LOW_CHANGE
Battery LowCS_SOCK_STATUS_CARD_READY_CHANGE
Ready ChangeCS_SOCK_STATUS_CARD_INSERTION_CHANGE
Card is insertedSunOS 5.11 Last change: 19 Jul 1996 4
Kernel Functions for Drivers csx_GetStatus(9F)
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 theraw_CardState field are identical to those
in the CardState field with the exceptionthat 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)
SunOS 5.11 Last change: 19 Jul 1996 5
Kernel Functions for Drivers csx_GetStatus(9F)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 6