1csx_GetStatus(9F)        Kernel Functions for Drivers        csx_GetStatus(9F)
2
3
4

NAME

6       csx_GetStatus - return the current status of a PC Card and its socket
7

SYNOPSIS

9       #include <sys/pccard.h>
10
11
12
13       int32_t csx_GetStatus(client_handle_t ch, get_status_t *gs);
14
15

INTERFACE LEVEL

17       Solaris DDI Specific (Solaris DDI)
18

PARAMETERS

20       ch     Client handle returned from csx_RegisterClient(9F).
21
22
23       gs     Pointer to a get_status_t structure.
24
25

DESCRIPTION

27       This function returns the current status of a PC Card and its socket.
28

STRUCTURE MEMBERS

30       The structure members of get_status_t are:
31
32         uint32_t     Socket;          /* socket number*/
33         uint32_t     CardState;       /* "live" card status for this client*/
34         uint32_t     SocketState;     /* latched socket values */
35         uint32_t     raw_CardState;   /* raw live card status */
36
37
38
39       The fields are defined as follows:
40
41       Socket            Not  used  in Solaris, but for portability with other
42                         Card Services implementations, it should  be  set  to
43                         the logical socket number.
44
45
46       CardState         The  CardState  field  is  the bit-mapped output data
47                         returned from Card Services. The bits  identify  what
48                         Card   Services  thinks  the  current  state  of  the
49                         installed PC Card is. The bits are:
50
51                         CS_STATUS_WRITE_PROTECTED
52
53                             Card is write protected
54
55
56                         CS_STATUS_CARD_LOCKED
57
58                             Card is locked
59
60
61                         CS_STATUS_EJECTION_REQUEST
62
63                             Ejection request in progress
64
65
66                         CS_STATUS_INSERTION_REQUEST
67
68                             Insertion request in progress
69
70
71                         CS_STATUS_BATTERY_DEAD
72
73                             Card battery is dead
74
75
76                         CS_STATUS_BATTERY_DEAD
77
78                             Card battery is dead (BVD1)
79
80
81                         CS_STATUS_BATTERY_LOW
82
83                             Card battery is low (BVD2)
84
85
86                         CS_STATUS_CARD_READY
87
88                             Card is READY
89
90
91                         CS_STATUS_CARD_INSERTED
92
93                             Card is inserted
94
95
96                         CS_STATUS_REQ_ATTN
97
98                             Extended status attention request
99
100
101                         CS_STATUS_RES_EVT1
102
103                             Extended status reserved event status
104
105
106                         CS_STATUS_RES_EVT2
107
108                             Extended status reserved event status
109
110
111                          CS_STATUS_RES_EVT3
112
113                             Extended status reserved event status
114
115
116                         CS_STATUS_VCC_50
117
118                             5.0 Volts Vcc Indicated
119
120
121                         CS_STATUS_VCC_33
122
123                             3.3 Volts Vcc Indicated
124
125
126                         CS_STATUS_VCC_XX
127
128                             X.X Volts Vcc Indicated
129
130                         The state of the  CS_STATUS_CARD_INSERTED  bit  indi‐
131                         cates whether the PC Card associated with this driver
132                         instance, not just  any  card,  is  inserted  in  the
133                         socket.  If an I/O card is installed in the specified
134                         socket, card state is  returned  from  the  PRR  (Pin
135                         Replacement  Register)  and  the ESR (Extended Status
136                         Register) (if present). If certain state bits are not
137                         present  in  the  PRR  or  ESR, a simulated state bit
138                         value is returned as defined below:
139
140                         CS_STATUS_WRITE_PROTECTED    Not write protected
141
142
143                         CS_STATUS_BATTERY_DEAD       Power good
144
145
146                         PCS_STATUS_BATTERY_LOW       Power good
147
148
149                         CS_STATUS_CARD_READY         Ready
150
151
152                         CS_STATUS_REQ_ATTN           Not set
153
154
155                         CS_STATUS_RES_EVT1           Not set
156
157
158                         CS_STATUS_RES_EVT2           Not set
159
160
161                         CS_STATUS_RES_EVT3           Not set
162
163
164
165       SocketState       The SocketState field is a  bit-map  of  the  current
166                         card and socket state. The bits are:
167
168                         CS_SOCK_STATUS_WRITE_PROTECT_CHANGE
169
170                             Write Protect
171
172
173                         ECS_SOCK_STATUS_CARD_LOCK_CHANGE
174
175                             Card Lock Change
176
177
178                         CS_SOCK_STATUS_EJECTION_PENDING
179
180                             Ejection Request
181
182
183                         CS_SOCK_STATUS_INSERTION_PENDING
184
185                             Insertion Request
186
187
188                         CS_SOCK_STATUS_BATTERY_DEAD_CHANGE
189
190                             Battery Dead
191
192
193                         CS_SOCK_STATUS_BATTERY_LOW_CHANGE
194
195                             Battery Low
196
197
198                         CS_SOCK_STATUS_CARD_READY_CHANGE
199
200                             Ready Change
201
202
203                         CS_SOCK_STATUS_CARD_INSERTION_CHANGE
204
205                             Card is inserted
206
207                              The  state reported in the SocketState field may
208                             be different from the state reported in the Card‐
209                             State  field. Clients should normally depend only
210                             on the state reported in the CardState field.
211
212                             The state reported in the SocketState  field  may
213                             be different from the state reported in the Card‐
214                             State field. Clients should normally depend  only
215                             on the state reported in the CardState field.
216
217
218
219       raw_CardState     The  raw_CardState field is a Solaris-specific exten‐
220                         sion that allows the client to determine if any  card
221                         is inserted in the socket. The bit definitions in the
222                         raw_CardState field are identical  to  those  in  the
223                         CardState  field  with the exception that the CS_STA‐
224                         TUS_CARD_INSERTED bit in the raw_CardState  field  is
225                         set whenever any card is inserted into the socket.
226
227

RETURN VALUES

229       CS_SUCCESS                  Successful operation.
230
231
232       CS_BAD_HANDLE               Client handle is invalid.
233
234
235       CS_BAD_SOCKET               Error getting socket state.
236
237
238       CS_UNSUPPORTED_FUNCTION     No PCMCIA hardware installed.
239
240
241
242       CS_NO_CARD  will  not be returned if there is no PC Card present in the
243       socket.
244

CONTEXT

246       This function may be called from user or kernel context.
247

SEE ALSO

249       csx_RegisterClient(9F)
250
251
252       PC Card 95 Standard, PCMCIA/JEIDA
253
254
255
256SunOS 5.11                        19 Jul 1996                csx_GetStatus(9F)
Impressum