Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
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.
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.
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]
#include <sys/pccard.h> int32_t csx_GetStatus(client_handle_t ch, get_status_t *gs);
Solaris DDI Specific (Solaris DDI)
Client handle returned from csx_RegisterClient(9F).
Pointer to a get_status_t structure.
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
Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number.
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
Card is locked
Ejection request in progress
Insertion request in progress
Card battery is dead
Card battery is dead (BVD1)
Card battery is low (BVD2)
Card is READY
Card is inserted
Extended status attention request
Extended status reserved event status
Extended status reserved event status
Extended status reserved event status
5.0 Volts Vcc Indicated
3.3 Volts Vcc Indicated
X.X Volts Vcc Indicated
Not write protected
Power good
Power good
Ready
Not set
Not set
Not set
Not set
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
Card Lock Change
Ejection Request
Insertion Request
Battery Dead
Battery Low
Ready 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.
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 exception that the CS_STATUS_CARD_INSERTED bit in the raw_CardState field is set whenever any card is inserted into the socket.
Successful operation.
Client handle is invalid.
Error getting socket state.
No PCMCIA hardware installed.
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.
csx_RegisterClient(9F)