Kernel Functions for Drivers csxGetStatus(9F)
NAME
csxGetStatus - return the current status of a PC Card and
its socket
SYNOPSIS
#include
int32t csxGetStatus(clienthandlet ch, getstatust *gs);
INTERFACE LEVEL
Solaris DI Specific (Solaris DI)
PARAMETERS
ch Client handle returned from csxRegisterClient(9F).
gs Pointer to a getstatust structure.
DESCRIPTION
This function returns the current status of a PC Card and
its socket.
STRUCTURE MEMBERS
The structure members of getstatust are:
uint32t Socket; /* socket number*/
uint32t CardState; /* "live" card status for this client*/
uint32t SocketState; /* latched socket values */
uint32t rawCardState; /* 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:
CSTATUSWRITEPROTECTED
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csxGetStatus(9F)
Card is write protected
CSTATUSCARDLOCKED
Card is locked
CSTATUSEJECTIONREQUEST
Ejection request in progress
CSTATUSINSERTIONREQUEST
Insertion request in progress
CSTATUSBATERYDEAD
Card battery is dead
CSTATUSBATERYDEAD
Card battery is dead (BVD1)
CSTATUSBATERYLOW
Card battery is low (BVD2)
CSTATUSCARDREADY
Card is READY
CSTATUSCARDINSERTED
Card is inserted
CSTATUSREQATN
Extended status attention request
CSTATUSRESEVT1
Extended status reserved event status
SunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csxGetStatus(9F)
CSTATUSRESEVT2
Extended status reserved event status
CSTATUSRESEVT3
Extended status reserved event status
CSTATUSVC50
5.0 Volts Vcc Indicated
CSTATUSVC33
3.3 Volts Vcc Indicated
CSTATUSVCX
X.X Volts Vcc Indicated
The state of the CSTATUSCARDINSERTED
bit indicates whether the PC Card associ-
ated 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
PR (Pin Replacement Register) and the ESR
(Extended Status Register) (if present).
If certain state bits are not present in
the PR or ESR, a simulated state bit
value is returned as defined below:
CSTATUSWRITEPROTECTED Not write
protected
CSTATUSBATERYDEAD Power good
PCSTATUSBATERYLOW Power good
CSTATUSCARDREADY Ready
CSTATUSREQATN Not set
SunOS 5.11 Last change: 19 Jul 1996 3
Kernel Functions for Drivers csxGetStatus(9F)
CSTATUSRESEVT1 Not set
CSTATUSRESEVT2 Not set
CSTATUSRESEVT3 Not set
SocketState The SocketState field is a bit-map of the
current card and socket state. The bits
are:
CSOCKSTATUSWRITEPROTECTCHANGE
Write Protect
ECSOCKSTATUSCARDLOCKCHANGE
Card Lock Change
CSOCKSTATUSEJECTIONPENDING
Ejection Request
CSOCKSTATUSINSERTIONPENDING
Insertion Request
CSOCKSTATUSBATERYDEADCHANGE
Battery Dead
CSOCKSTATUSBATERYLOWCHANGE
Battery Low
CSOCKSTATUSCARDREADYCHANGE
Ready Change
CSOCKSTATUSCARDINSERTIONCHANGE
Card is inserted
SunOS 5.11 Last change: 19 Jul 1996 4
Kernel Functions for Drivers csxGetStatus(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.
rawCardState The rawCardState 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
rawCardState field are identical to those
in the CardState field with the exception
that the CSTATUSCARDINSERTED bit in
the rawCardState field is set whenever
any card is inserted into the socket.
RETURN VALUES
CSUCES Successful operation.
CSBADHANDLE Client handle is invalid.
CSBADSOCKET Error getting socket state.
CSUNSUPORTEDFUNCTION No PCMCIA hardware installed.
CSNOCARD 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
csxRegisterClient(9F)
SunOS 5.11 Last change: 19 Jul 1996 5
Kernel Functions for Drivers csxGetStatus(9F)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 6
|