summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f/csx_GetStatus.9f
blob: 24e600d3617674bac5f3ec91e91d7d0d2dc7edd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
'\" te
.\"  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]
.TH CSX_GETSTATUS 9F "Jul 19, 1996"
.SH NAME
csx_GetStatus \- return the current status of a PC Card and its socket
.SH SYNOPSIS
.LP
.nf
#include <sys/pccard.h>



\fBint32_t\fR \fBcsx_GetStatus\fR(\fBclient_handle_t\fR \fIch\fR, \fBget_status_t *\fR\fIgs\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIch\fR \fR
.ad
.RS 7n
Client handle returned from \fBcsx_RegisterClient\fR(9F).
.RE

.sp
.ne 2
.na
\fB\fIgs\fR \fR
.ad
.RS 7n
Pointer to a \fBget_status_t\fR structure.
.RE

.SH DESCRIPTION
.sp
.LP
This function returns the current status of a \fBPC \fRCard and its socket.
.SH STRUCTURE MEMBERS
.sp
.LP
The structure members of \fBget_status_t\fR are:
.sp
.in +2
.nf
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 */
.fi
.in -2

.sp
.LP
The fields are defined as follows:
.sp
.ne 2
.na
\fB\fBSocket\fR \fR
.ad
.RS 18n
Not used in Solaris, but for portability with other Card Services
implementations, it should be set to the logical socket number.
.RE

.sp
.ne 2
.na
\fB\fBCardState\fR \fR
.ad
.RS 18n
The \fBCardState\fR field is the bit-mapped output data returned from Card
Services. The bits identify what Card Services thinks the current state of the
installed \fBPC \fRCard is. The bits are:
.sp
.ne 2
.na
\fBCS_STATUS_WRITE_PROTECTED\fR
.ad
.sp .6
.RS 4n
Card is write protected
.RE

.sp
.ne 2
.na
\fBCS_STATUS_CARD_LOCKED\fR
.ad
.sp .6
.RS 4n
Card is locked
.RE

.sp
.ne 2
.na
\fBCS_STATUS_EJECTION_REQUEST\fR
.ad
.sp .6
.RS 4n
Ejection request in progress
.RE

.sp
.ne 2
.na
\fBCS_STATUS_INSERTION_REQUEST\fR
.ad
.sp .6
.RS 4n
Insertion request in progress
.RE

.sp
.ne 2
.na
\fBCS_STATUS_BATTERY_DEAD\fR
.ad
.sp .6
.RS 4n
Card battery is dead
.RE

.sp
.ne 2
.na
\fBCS_STATUS_BATTERY_DEAD\fR
.ad
.sp .6
.RS 4n
Card battery is dead (\fBBVD1\fR)
.RE

.sp
.ne 2
.na
\fBCS_STATUS_BATTERY_LOW\fR
.ad
.sp .6
.RS 4n
Card battery is low (\fBBVD2\fR)
.RE

.sp
.ne 2
.na
\fBCS_STATUS_CARD_READY\fR
.ad
.sp .6
.RS 4n
Card is READY
.RE

.sp
.ne 2
.na
\fBCS_STATUS_CARD_INSERTED\fR
.ad
.sp .6
.RS 4n
Card is inserted
.RE

.sp
.ne 2
.na
\fBCS_STATUS_REQ_ATTN\fR
.ad
.sp .6
.RS 4n
Extended status attention request
.RE

.sp
.ne 2
.na
\fBCS_STATUS_RES_EVT1\fR
.ad
.sp .6
.RS 4n
Extended status reserved event status
.RE

.sp
.ne 2
.na
\fBCS_STATUS_RES_EVT2\fR
.ad
.sp .6
.RS 4n
Extended status reserved event status
.RE

.sp
.ne 2
.na
\fB CS_STATUS_RES_EVT3\fR
.ad
.sp .6
.RS 4n
Extended status reserved event status
.RE

.sp
.ne 2
.na
\fBCS_STATUS_VCC_50\fR
.ad
.sp .6
.RS 4n
5.0 Volts Vcc Indicated
.RE

.sp
.ne 2
.na
\fBCS_STATUS_VCC_33\fR
.ad
.sp .6
.RS 4n
3.3 Volts Vcc Indicated
.RE

.sp
.ne 2
.na
\fBCS_STATUS_VCC_XX\fR
.ad
.sp .6
.RS 4n
X.X Volts Vcc Indicated
.RE

The state of the \fBCS_STATUS_CARD_INSERTED\fR bit indicates whether the \fBPC
\fRCard associated with this driver instance, not just any card, is inserted in
the socket. If an \fBI/O \fRcard is installed in the specified socket, card
state is returned from the \fBPRR\fR (Pin Replacement Register) and the
\fBESR\fR (Extended Status Register) (if present). If certain state bits are
not present in the \fBPRR\fR or \fBESR\fR, a simulated state bit value is
returned as defined below:
.sp
.ne 2
.na
\fBCS_STATUS_WRITE_PROTECTED\fR
.ad
.RS 29n
Not write protected
.RE

.sp
.ne 2
.na
\fBCS_STATUS_BATTERY_DEAD\fR
.ad
.RS 29n
Power good
.RE

.sp
.ne 2
.na
\fBPCS_STATUS_BATTERY_LOW\fR
.ad
.RS 29n
Power good
.RE

.sp
.ne 2
.na
\fBCS_STATUS_CARD_READY\fR
.ad
.RS 29n
Ready
.RE

.sp
.ne 2
.na
\fBCS_STATUS_REQ_ATTN\fR
.ad
.RS 29n
Not set
.RE

.sp
.ne 2
.na
\fBCS_STATUS_RES_EVT1\fR
.ad
.RS 29n
Not set
.RE

.sp
.ne 2
.na
\fBCS_STATUS_RES_EVT2\fR
.ad
.RS 29n
Not set
.RE

.sp
.ne 2
.na
\fBCS_STATUS_RES_EVT3\fR
.ad
.RS 29n
Not set
.RE

.RE

.sp
.ne 2
.na
\fB\fBSocketState\fR \fR
.ad
.RS 18n
The \fBSocketState\fR field is a bit-map of the current card and socket state.
The bits are:
.sp
.ne 2
.na
\fBCS_SOCK_STATUS_WRITE_PROTECT_CHANGE\fR
.ad
.sp .6
.RS 4n
Write Protect
.RE

.sp
.ne 2
.na
\fBECS_SOCK_STATUS_CARD_LOCK_CHANGE\fR
.ad
.sp .6
.RS 4n
Card Lock Change
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_EJECTION_PENDING\fR
.ad
.sp .6
.RS 4n
Ejection Request
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_INSERTION_PENDING\fR
.ad
.sp .6
.RS 4n
Insertion Request
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_BATTERY_DEAD_CHANGE\fR
.ad
.sp .6
.RS 4n
Battery Dead
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_BATTERY_LOW_CHANGE\fR
.ad
.sp .6
.RS 4n
Battery Low
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_CARD_READY_CHANGE\fR
.ad
.sp .6
.RS 4n
Ready Change
.RE

.sp
.ne 2
.na
\fBCS_SOCK_STATUS_CARD_INSERTION_CHANGE\fR
.ad
.sp .6
.RS 4n
Card is inserted
.sp
 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.
.sp
The state reported in the \fBSocketState\fR field may be different from the
state reported in the \fBCardState\fR field. Clients should normally depend
only on the state reported in the \fBCardState\fR field.
.RE

.RE

.sp
.ne 2
.na
\fB\fBraw_CardState\fR \fR
.ad
.RS 18n
The \fBraw_CardState\fR 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 \fBraw_CardState\fR field are identical to those in the \fBCardState\fR
field with the exception that the \fBCS_STATUS_CARD_INSERTED\fR bit in the
\fBraw_CardState\fR field is set whenever any card is inserted into the socket.
.RE

.SH RETURN VALUES
.sp
.ne 2
.na
\fB\fBCS_SUCCESS\fR \fR
.ad
.RS 28n
Successful operation.
.RE

.sp
.ne 2
.na
\fB\fBCS_BAD_HANDLE\fR \fR
.ad
.RS 28n
Client handle is invalid.
.RE

.sp
.ne 2
.na
\fB\fBCS_BAD_SOCKET\fR \fR
.ad
.RS 28n
Error getting socket state.
.RE

.sp
.ne 2
.na
\fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
.ad
.RS 28n
No \fBPCMCIA \fRhardware installed.
.RE

.sp
.LP
\fBCS_NO_CARD\fR will not be returned if there is no \fBPC \fRCard present in
the socket.
.SH CONTEXT
.sp
.LP
This function may be called from user or kernel context.
.SH SEE ALSO
.sp
.LP
\fBcsx_RegisterClient\fR(9F)
.sp
.LP
\fIPC Card 95 Standard, PCMCIA/JEIDA\fR