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

# membus.h

    00001 /*! \file membus.h \brief Software-driven Memory Bus for ARMmini-LPC210x. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'membus.h'
    00005 // Title        : Software-driven Memory Bus for ARMmini-LPC210x
    00006 // Author       : Pascal Stang - Copyright (C) 2004
    00007 // Created      : 2004.05.05
    00008 // Revised      : 2004.07.12
    00009 // Version      : 0.1
    00010 // Target MCU   : ARM processors
    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 #define MEMBUS_IO       0xFFFF0000
    00028 #define MEMBUS_LATCH    0x00000800
    00029 #define MEMBUS_nRD      0x00001000
    00030 #define MEMBUS_nWR      0x00002000
    00031 #define P015            0x00008000
    00032
    00033 //#define MEMBUS_DELAY
    00034 //#define MEMBUS_DELAY  asm volatile ("nop\r\n")
    00035 //#define MEMBUS_DELAY  asm volatile ("nop\r\n nop\r\n")
    00036 //#define MEMBUS_DELAY  asm volatile ("nop\r\n nop\r\n nop\r\n nop\r\n")
    00037 //#define MEMBUS_DELAY  asm volatile ("nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n")
    00038 #define MEMBUS_DELAY    asm volatile ("nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n")
    00039 //#define MEMBUS_DELAY  asm volatile ("nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n nop\r\n")
    00040 //#define MEMBUS_DELAY  delay(1000)
    00041
    00042 void membusInit(void);
    00043 uint16_t membusRead(uint16_t addr);
    00044 void membusWrite(uint16_t addr, uint16_t data);
    00045
    00046 #endif