2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CSX_GETSTATUS 9F "Jul 19, 1996"
8 csx_GetStatus \- return the current status of a PC Card and its socket
12 #include <sys/pccard.h>
16 \fBint32_t\fR \fBcsx_GetStatus\fR(\fBclient_handle_t\fR \fIch\fR, \fBget_status_t *\fR\fIgs\fR);
22 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
30 Client handle returned from \fBcsx_RegisterClient\fR(9F).
39 Pointer to a \fBget_status_t\fR structure.
45 This function returns the current status of a \fBPC \fRCard and its socket.
49 The structure members of \fBget_status_t\fR are:
53 uint32_t Socket; /* socket number*/
54 uint32_t CardState; /* "live" card status for this client*/
55 uint32_t SocketState; /* latched socket values */
56 uint32_t raw_CardState; /* raw live card status */
62 The fields are defined as follows:
69 Not used in Solaris, but for portability with other Card Services
70 implementations, it should be set to the logical socket number.
76 \fB\fBCardState\fR \fR
79 The \fBCardState\fR field is the bit-mapped output data returned from Card
80 Services. The bits identify what Card Services thinks the current state of the
81 installed \fBPC \fRCard is. The bits are:
85 \fBCS_STATUS_WRITE_PROTECTED\fR
89 Card is write protected
95 \fBCS_STATUS_CARD_LOCKED\fR
105 \fBCS_STATUS_EJECTION_REQUEST\fR
109 Ejection request in progress
115 \fBCS_STATUS_INSERTION_REQUEST\fR
119 Insertion request in progress
125 \fBCS_STATUS_BATTERY_DEAD\fR
135 \fBCS_STATUS_BATTERY_DEAD\fR
139 Card battery is dead (\fBBVD1\fR)
145 \fBCS_STATUS_BATTERY_LOW\fR
149 Card battery is low (\fBBVD2\fR)
155 \fBCS_STATUS_CARD_READY\fR
165 \fBCS_STATUS_CARD_INSERTED\fR
175 \fBCS_STATUS_REQ_ATTN\fR
179 Extended status attention request
185 \fBCS_STATUS_RES_EVT1\fR
189 Extended status reserved event status
195 \fBCS_STATUS_RES_EVT2\fR
199 Extended status reserved event status
205 \fB CS_STATUS_RES_EVT3\fR
209 Extended status reserved event status
215 \fBCS_STATUS_VCC_50\fR
219 5.0 Volts Vcc Indicated
225 \fBCS_STATUS_VCC_33\fR
229 3.3 Volts Vcc Indicated
235 \fBCS_STATUS_VCC_XX\fR
239 X.X Volts Vcc Indicated
242 The state of the \fBCS_STATUS_CARD_INSERTED\fR bit indicates whether the \fBPC
243 \fRCard associated with this driver instance, not just any card, is inserted in
244 the socket. If an \fBI/O \fRcard is installed in the specified socket, card
245 state is returned from the \fBPRR\fR (Pin Replacement Register) and the
246 \fBESR\fR (Extended Status Register) (if present). If certain state bits are
247 not present in the \fBPRR\fR or \fBESR\fR, a simulated state bit value is
248 returned as defined below:
252 \fBCS_STATUS_WRITE_PROTECTED\fR
261 \fBCS_STATUS_BATTERY_DEAD\fR
270 \fBPCS_STATUS_BATTERY_LOW\fR
279 \fBCS_STATUS_CARD_READY\fR
288 \fBCS_STATUS_REQ_ATTN\fR
297 \fBCS_STATUS_RES_EVT1\fR
306 \fBCS_STATUS_RES_EVT2\fR
315 \fBCS_STATUS_RES_EVT3\fR
326 \fB\fBSocketState\fR \fR
329 The \fBSocketState\fR field is a bit-map of the current card and socket state.
334 \fBCS_SOCK_STATUS_WRITE_PROTECT_CHANGE\fR
344 \fBECS_SOCK_STATUS_CARD_LOCK_CHANGE\fR
354 \fBCS_SOCK_STATUS_EJECTION_PENDING\fR
364 \fBCS_SOCK_STATUS_INSERTION_PENDING\fR
374 \fBCS_SOCK_STATUS_BATTERY_DEAD_CHANGE\fR
384 \fBCS_SOCK_STATUS_BATTERY_LOW_CHANGE\fR
394 \fBCS_SOCK_STATUS_CARD_READY_CHANGE\fR
404 \fBCS_SOCK_STATUS_CARD_INSERTION_CHANGE\fR
410 The state reported in the SocketState field may be different from the state
411 reported in the CardState field. Clients should normally depend only on the
412 state reported in the CardState field.
414 The state reported in the \fBSocketState\fR field may be different from the
415 state reported in the \fBCardState\fR field. Clients should normally depend
416 only on the state reported in the \fBCardState\fR field.
424 \fB\fBraw_CardState\fR \fR
427 The \fBraw_CardState\fR field is a Solaris-specific extension that allows the
428 client to determine if any card is inserted in the socket. The bit definitions
429 in the \fBraw_CardState\fR field are identical to those in the \fBCardState\fR
430 field with the exception that the \fBCS_STATUS_CARD_INSERTED\fR bit in the
431 \fBraw_CardState\fR field is set whenever any card is inserted into the socket.
438 \fB\fBCS_SUCCESS\fR \fR
441 Successful operation.
447 \fB\fBCS_BAD_HANDLE\fR \fR
450 Client handle is invalid.
456 \fB\fBCS_BAD_SOCKET\fR \fR
459 Error getting socket state.
465 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
468 No \fBPCMCIA \fRhardware installed.
473 \fBCS_NO_CARD\fR will not be returned if there is no \fBPC \fRCard present in
478 This function may be called from user or kernel context.
482 \fBcsx_RegisterClient\fR(9F)
485 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR