CSX_GETSTATUS(9F) | Kernel Functions for Drivers | CSX_GETSTATUS(9F) |
csx_GetStatus - return the current status of a PC Card and its socket
#include <sys/pccard.h> int32_t csx_GetStatus(client_handle_t ch, get_status_t *gs);
illumos DDI Specific (illumos DDI)
ch
gs
This function returns the current status of a PC Card and its socket.
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
CardState
CS_STATUS_WRITE_PROTECTED
CS_STATUS_CARD_LOCKED
CS_STATUS_EJECTION_REQUEST
CS_STATUS_INSERTION_REQUEST
CS_STATUS_BATTERY_DEAD
CS_STATUS_BATTERY_DEAD
CS_STATUS_BATTERY_LOW
CS_STATUS_CARD_READY
CS_STATUS_CARD_INSERTED
CS_STATUS_REQ_ATTN
CS_STATUS_RES_EVT1
CS_STATUS_RES_EVT2
CS_STATUS_RES_EVT3
CS_STATUS_VCC_50
CS_STATUS_VCC_33
CS_STATUS_VCC_XX
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
CS_STATUS_BATTERY_DEAD
PCS_STATUS_BATTERY_LOW
CS_STATUS_CARD_READY
CS_STATUS_REQ_ATTN
CS_STATUS_RES_EVT1
CS_STATUS_RES_EVT2
CS_STATUS_RES_EVT3
SocketState
CS_SOCK_STATUS_WRITE_PROTECT_CHANGE
ECS_SOCK_STATUS_CARD_LOCK_CHANGE
CS_SOCK_STATUS_EJECTION_PENDING
CS_SOCK_STATUS_INSERTION_PENDING
CS_SOCK_STATUS_BATTERY_DEAD_CHANGE
CS_SOCK_STATUS_BATTERY_LOW_CHANGE
CS_SOCK_STATUS_CARD_READY_CHANGE
CS_SOCK_STATUS_CARD_INSERTION_CHANGE
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
CS_SUCCESS
CS_BAD_HANDLE
CS_BAD_SOCKET
CS_UNSUPPORTED_FUNCTION
CS_NO_CARD will not be returned if there is no PC Card present in the socket.
This function may be called from user or kernel context.
PC Card 95 Standard, PCMCIA/JEIDA
July 19, 1996 | OmniOS |