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

# ataconf.h

Go to the documentation of this file.

    00001 /*! \file ataconf.h \brief IDE-ATA interface driver configuration. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'ataconf.h'
    00005 // Title        : IDE-ATA interface driver for hard disks
    00006 // Author       : Pascal Stang - Copyright (C) 2004
    00007 // Date         : 4/2/2004
    00008 // Revised      : 4/2/2004
    00009 // Version      : 0.1
    00010 // Target MCU   : Atmel AVR 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 ATACONF_H
    00023 #define ATACONF_H
    00024
    00025 // debug on/off
    00026 //#define DEBUG_ATA
    00027
    00028 // constants
    00029 #define SECTOR_BUFFER_ADDR  0x40008000
    00030
    00031 // ATA register base address
    00032 #define ATA_REG_BASE        0x8000
    00033 // ATA register offset
    00034 #define ATA_REG_DATA        (0x8000+0x00)
    00035 #define ATA_REG_ERROR       (0x8000+0x01)
    00036 #define ATA_REG_SECCOUNT    (0x8000+0x02)
    00037 #define ATA_REG_STARTSEC    (0x8000+0x03)
    00038 #define ATA_REG_CYLLO       (0x8000+0x04)
    00039 #define ATA_REG_CYLHI       (0x8000+0x05)
    00040 #define ATA_REG_HDDEVSEL    (0x8000+0x06)
    00041 #define ATA_REG_CMDSTATUS1  (0x8000+0x07)
    00042 // not correct
    00043 #define ATA_REG_CMDSTATUS2  (0x4000+0x08)
    00044 #define ATA_REG_ACTSTATUS   (0x4000+0x09)
    00045
    00046 #endif