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_MAPMEMPAGE 9F "Jul 19, 1996"
   7 .SH NAME
   8 csx_MapMemPage \- map the memory area on a PC Card
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pccard.h>
  13 
  14 
  15 
  16 \fBint32_t\fR \fBcsx_MapMemPage\fR(\fBwindow_handle_t\fR \fIwh\fR, \fBmap_mem_page_t *\fR\fImp\fR);
  17 .fi
  18 
  19 .SH INTERFACE LEVEL
  20 .sp
  21 .LP
  22 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
  23 .SH PARAMETERS
  24 .sp
  25 .ne 2
  26 .na
  27 \fB\fIwh\fR \fR
  28 .ad
  29 .RS 7n
  30 Window handle returned from \fBcsx_RequestWindow\fR(9F).
  31 .RE
  32 
  33 .sp
  34 .ne 2
  35 .na
  36 \fB\fImp\fR \fR
  37 .ad
  38 .RS 7n
  39 Pointer to a \fBmap_mem_page_t\fR structure.
  40 .RE
  41 
  42 .SH DESCRIPTION
  43 .sp
  44 .LP
  45 This function maps the memory area on a \fBPC \fRCard into a page of a window
  46 allocated with the \fBcsx_RequestWindow\fR(9F) function.
  47 .SH STRUCTURE MEMBERS
  48 .sp
  49 .LP
  50 The structure members of \fBmap_mem_page_t\fR are:
  51 .sp
  52 .in +2
  53 .nf
  54 uint32_t     CardOffset;       /* card offset */
  55 uint32_t     Page;             /* page number */
  56 .fi
  57 .in -2
  58 
  59 .sp
  60 .LP
  61 The fields are defined as follows:
  62 .sp
  63 .ne 2
  64 .na
  65 \fB\fBCardOffset\fR \fR
  66 .ad
  67 .RS 15n
  68 The absolute offset in bytes from the beginning of the \fBPC \fRCard to map
  69 into system memory.
  70 .RE
  71 
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fBPage\fR \fR
  76 .ad
  77 .RS 15n
  78 Used internally by Card Services; clients must set this field to \fB0\fR before
  79 calling this function.
  80 .RE
  81 
  82 .SH RETURN VALUES
  83 .sp
  84 .ne 2
  85 .na
  86 \fB\fBCS_SUCCESS\fR \fR
  87 .ad
  88 .RS 28n
  89 Successful operation.
  90 .RE
  91 
  92 .sp
  93 .ne 2
  94 .na
  95 \fB\fBCS_BAD_HANDLE\fR \fR
  96 .ad
  97 .RS 28n
  98 Client handle is invalid.
  99 .RE
 100 
 101 .sp
 102 .ne 2
 103 .na
 104 \fB\fBCS_BAD_OFFSET\fR \fR
 105 .ad
 106 .RS 28n
 107 Offset is invalid.
 108 .RE
 109 
 110 .sp
 111 .ne 2
 112 .na
 113 \fB\fBCS_BAD_PAGE\fR \fR
 114 .ad
 115 .RS 28n
 116 Page is not zero.
 117 .RE
 118 
 119 .sp
 120 .ne 2
 121 .na
 122 \fB\fBCS_NO_CARD\fR \fR
 123 .ad
 124 .RS 28n
 125 No \fBPC \fRCard in socket.
 126 .RE
 127 
 128 .sp
 129 .ne 2
 130 .na
 131 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
 132 .ad
 133 .RS 28n
 134 No \fBPCMCIA \fRhardware installed.
 135 .RE
 136 
 137 .SH CONTEXT
 138 .sp
 139 .LP
 140 This function may be called from user or kernel context.
 141 .SH SEE ALSO
 142 .sp
 143 .LP
 144 \fBcsx_ModifyWindow\fR(9F), \fBcsx_ReleaseWindow\fR(9F),
 145 \fBcsx_RequestWindow\fR(9F)
 146 .sp
 147 .LP
 148 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR