1 '\" te
   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_PARSE_CISTPL_BATTERY 9F "Dec 20, 1996"
   7 .SH NAME
   8 csx_Parse_CISTPL_BATTERY \- parse the Battery Replacement Date tuple
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pccard.h>
  13 
  14 
  15 
  16 \fBint32_t\fR \fBcsx_Parse_CISTPL_BATTERY\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
  17      \fBcistpl_battery_t *\fR\fIcb\fR);
  18 .fi
  19 
  20 .SH INTERFACE LEVEL
  21 .sp
  22 .LP
  23 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
  24 .SH PARAMETERS
  25 .sp
  26 .ne 2
  27 .na
  28 \fB\fIch\fR\fR
  29 .ad
  30 .RS 6n
  31 Client handle returned from \fBcsx_RegisterClient\fR(9F).
  32 .RE
  33 
  34 .sp
  35 .ne 2
  36 .na
  37 \fB\fItu\fR\fR
  38 .ad
  39 .RS 6n
  40 Pointer to a \fBtuple_t\fR structure (see \fBtuple\fR(9S)) returned by a call
  41 to \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F).
  42 .RE
  43 
  44 .sp
  45 .ne 2
  46 .na
  47 \fB\fIcb\fR\fR
  48 .ad
  49 .RS 6n
  50 Pointer to a \fBcistpl_battery_t\fR structure which contains the parsed
  51 \fBCISTPL_BATTERY\fR tuple information upon return from this function.
  52 .RE
  53 
  54 .SH DESCRIPTION
  55 .sp
  56 .LP
  57 This function parses the Battery Replacement Date tuple, \fBCISTPL_BATTERY,\fR
  58 into a form usable by \fBPC \fRCard drivers.
  59 .sp
  60 .LP
  61 The \fBCISTPL_BATTERY\fR tuple is an optional tuple which shall be present only
  62 in \fBPC \fRCards with battery-backed storage. It indicates the date on which
  63 the battery was replaced, and the date on which the battery is expected to need
  64 replacement. Only one \fBCISTPL_BATTERY\fR tuple is allowed per \fBPC \fRCard.
  65 .SH STRUCTURE MEMBERS
  66 .sp
  67 .LP
  68 The structure members of \fBcistpl_battery_t\fR are:
  69 .sp
  70 .in +2
  71 .nf
  72 uint32_t     rday;     /* date battery last replaced */
  73 uint32_t     xday;     /* date battery due for replacement */
  74 .fi
  75 .in -2
  76 
  77 .sp
  78 .LP
  79 The fields are defined as follows:
  80 .sp
  81 .ne 2
  82 .na
  83 \fB\fBrday\fR\fR
  84 .ad
  85 .RS 8n
  86 This field indicates the date on which the battery was last replaced.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fB\fBxday\fR\fR
  93 .ad
  94 .RS 8n
  95 This field indicates the date on which the battery should be replaced.
  96 .RE
  97 
  98 .SH RETURN VALUES
  99 .sp
 100 .ne 2
 101 .na
 102 \fB\fBCS_SUCCESS\fR\fR
 103 .ad
 104 .RS 27n
 105 Successful operation.
 106 .RE
 107 
 108 .sp
 109 .ne 2
 110 .na
 111 \fB\fBCS_BAD_HANDLE\fR\fR
 112 .ad
 113 .RS 27n
 114 Client handle is invalid.
 115 .RE
 116 
 117 .sp
 118 .ne 2
 119 .na
 120 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
 121 .ad
 122 .RS 27n
 123 Parser does not know how to parse tuple.
 124 .RE
 125 
 126 .sp
 127 .ne 2
 128 .na
 129 \fB\fBCS_NO_CARD\fR\fR
 130 .ad
 131 .RS 27n
 132 No \fBPC \fRCard in socket.
 133 .RE
 134 
 135 .sp
 136 .ne 2
 137 .na
 138 \fB\fBCS_NO_CIS\fR\fR
 139 .ad
 140 .RS 27n
 141 No Card Information Structure (CIS) on \fBPC \fRCard.
 142 .RE
 143 
 144 .sp
 145 .ne 2
 146 .na
 147 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
 148 .ad
 149 .RS 27n
 150 No \fBPCMCIA \fRhardware installed.
 151 .RE
 152 
 153 .SH CONTEXT
 154 .sp
 155 .LP
 156 This function may be called from user or kernel context.
 157 .SH SEE ALSO
 158 .sp
 159 .LP
 160 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_GetTupleData\fR(9F),
 161 \fBcsx_RegisterClient\fR(9F), \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S)
 162 .sp
 163 .LP
 164 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR