Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# membus.h

    00001 /*! \file membus.h \brief Memory Bus Driver for ADuC7026. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'membus.h'
    00005 // Title        : Memory Bus Driver for ADuC7026
    00006 // Author       : Pascal Stang - Copyright (C) 2005
    00007 // Created      : 2005.02.14
    00008 // Revised      : 2005.02.14
    00009 // Version      : 0.1
    00010 // Target MCU   : Analog Devices ADuC7026 ARM Series
    00011 // Editor Tabs  : 4
    00012 //
    00013 // NOTE: This code is currently below version 1.0, and therefore is considered
    00014 // to be lacking in some functionality or documentation, or may not be fully
    00015 // tested.  Nonetheless, you can expect most functions to work.
    00016 //
    00017 // This code is distributed under the GNU Public License
    00018 //      which can be found at http://www.gnu.org/licenses/gpl.txt
    00019 //
    00020 //*****************************************************************************
    00021
    00022 #ifndef MEMBUS_H
    00023 #define MEMBUS_H
    00024
    00025 #include "global.h"
    00026
    00027 // defines
    00028 #define XMCON_16BIT         (1<<1)
    00029 #define XMCON_ENABLE        (1<<0)
    00030
    00031 #define XMPAR_BWS           (1<<15)
    00032 #define XMPAR_AE_WS2        (1<<14)
    00033 #define XMPAR_AE_WS1        (1<<13)
    00034 #define XMPAR_AE_WS0        (1<<12)
    00035 #define XMPAR_16BITADDR     (1<<11)
    00036 #define XMPAR_EXTRAHOLD     (1<<10)
    00037 #define XMPAR_EXTRAREAD     (1<<9)
    00038 #define XMPAR_EXTRAWRITE    (1<<8)
    00039 #define XMPAR_WR_WS3        (1<<7)
    00040 #define XMPAR_WR_WS2        (1<<6)
    00041 #define XMPAR_WR_WS1        (1<<5)
    00042 #define XMPAR_WR_WS0        (1<<4)
    00043 #define XMPAR_RD_WS3        (1<<3)
    00044 #define XMPAR_RD_WS2        (1<<2)
    00045 #define XMPAR_RD_WS1        (1<<1)
    00046 #define XMPAR_RD_WS0        (1<<0)
    00047
    00048 // memory bank addresses
    00049 #define XM_ADDR_MEMORY0     0x10000000l
    00050 #define XM_ADDR_MEMORY1     0x20000000l
    00051 #define XM_ADDR_MEMORY2     0x30000000l
    00052 #define XM_ADDR_MEMORY3     0x40000000l
    00053
    00054 // functions
    00055 void membusInit(void);
    00056 uint16_t membusRead(uint32_t addr);
    00057 void membusWrite(uint32_t addr, uint16_t data);
    00058
    00059 #endif