File nut/arch/avr/dev/pcmcia.c

* This file is part of the WLAN-Ethernut driver.
* Copyright (c) 2004 by Michael Fischer. All rights reserved.
* Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
* 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE.
**************************************************************************** * History:
* 07.02.04 mifi First Version for the XC9572-PC84 ONLY! * The BASE_ADDRESS is 0x8800!!


Included Files


Preprocessor definitions

#define __PCMCIA_C__

#define BASE_ADDRESS 0x8800

#define DATA_LOW 0

#define DATA_HIGH 1

#define ADDRESS_LOW 2

#define ADDRESS_HIGH 3

#define CTRL 4

#define CTRL_CE1 0x01

#define CTRL_CE2 0x02

#define CTRL_OE 0x04

#define CTRL_WE 0x08

#define CTRL_IORD 0x10

#define CTRL_IOWR 0x20

#define CTRL_REGS 0x40

#define CTRL_DATA_OUT 0x80

#define DATA_LOW_REG

#define DATA_HIGH_REG

#define ADDRESS_LOW_REG

#define ADDRESS_HIGH_REG

#define CTRL_REG

#define DELAY_CE_WRITE

#define DELAY_WRITE

#define DELAY_WRITE_CE

#define DELAY_CE_READ

#define DELAY_READ

#define DELAY_READ_CE


Typedef MEMORY_TYPE

typedef enum {...} MEMORY_TYPE
enum  
   {  
      TYPE_IO;  
      TYPE_MEM;  
   }  

Global Function pcmcia_ReadMem()

WORD pcmcia_ReadMem ( WORD wAddress )
Prototyped in: nut/include/dev/pcmcia.h
Calls: ReadXXX() nut/arch/avr/dev/pcmcia.c

Global Function pcmcia_ReadReg()

WORD pcmcia_ReadReg ( WORD wAddress )
Prototyped in: nut/include/dev/pcmcia.h
Calls: ReadXXX() nut/arch/avr/dev/pcmcia.c

Global Function pcmcia_WriteMem()

void pcmcia_WriteMem ( WORD wAddress, WORD wData )
Prototyped in: nut/include/dev/pcmcia.h
Calls: WriteXXX() nut/arch/avr/dev/pcmcia.c

Global Function pcmcia_WriteReg()

void pcmcia_WriteReg ( WORD wAddress, WORD wData )
Prototyped in: nut/include/dev/pcmcia.h
Calls: WriteXXX() nut/arch/avr/dev/pcmcia.c

Local Function ReadXXX()

static WORD ReadXXX ( WORD wAddress, MEMORY_TYPE eIO )
Called by: pcmcia_ReadMem() nut/arch/avr/dev/pcmcia.c
  pcmcia_ReadReg() nut/arch/avr/dev/pcmcia.c

Local Function WriteXXX()

static void WriteXXX ( WORD wAddress, WORD wData, MEMORY_TYPE eIO )
Called by: pcmcia_WriteMem() nut/arch/avr/dev/pcmcia.c
  pcmcia_WriteReg() nut/arch/avr/dev/pcmcia.c