File nut/include/dev/ide.h

* This file is part of the AVRIDE device driver.
* Copyright (c) 2002-2003 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:
* 14.12.02 mifi First Version * 18.01.03 mifi Change Licence from GPL to BSD * 25.01.03 mifi Change IDEInit. * 29.01.03 mifi Remove IDE_MAX_SUPPORTED_DEVICE, support 2 drives now. * 29.06.03 mifi First ATAPI-Version


Included Files


Preprocessor definitions

#define __IDE_H__

#define IDE_SUPPORT_WRITE 0

#define IDE_SUPPORT_ATAPI 1

#define ATAPI_START_SEARCH_SECTOR 16

#define ATAPI_MAX_SEARCH_SECTOR 100

#define IDE_OK 0x00

#define IDE_ERROR 0x01

#define IDE_DRIVE_NOT_FOUND 0x02

#define IDE_PARAM_ERROR 0x03

#define IDE_BUSY 0x04

#define IDE_NOT_SUPPORTED 0x08

#define IDE_DRIVE_C 0

#define IDE_DRIVE_D 1

#define IDE_HARDDISK 0

#define IDE_HARDDISK_7MHZ 1

#define IDE_COMPACT_FLASH 2

#define MEM_8BIT_COMPACT_FLASH 3

#define IDE_SECTOR_SIZE 512

#define ATAPI_SECTOR_SIZE 2048

#define MAX_SECTOR_SIZE 2048


Typedef IDE_MOUNT_FUNC

typedef void IDE_MOUNT_FUNC(int nDevice)