Nut/OS  4.10.3
API Reference
idep.h File Reference
#include <dev/ide.h>
#include <fs/typedefs.h>
Include dependency graph for idep.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  IDEDEVICEINFO

Defines

#define IDE_SUPPORT_CHS   0
#define IDE_BASE_ADDRESS   0xE000
#define IDECS0   0x0000
#define IDECS1   0x0500
#define DATA_WRITE_REG_LOW   (IDECS0 + 0x0100)
#define DATA_WRITE_REG_HIGH   (IDECS0 + 0x0200)
#define DATA_READ_REG_LOW   (IDECS0 + 0x0300)
#define DATA_READ_REG_HIGH   (IDECS0 + 0x0400)
#define ERROR_REG   (IDECS0 + 1)
#define FEATURE_REG   (IDECS0 + 1)
#define SECTOR_COUNT_REG   (IDECS0 + 2)
#define SECTOR_REG   (IDECS0 + 3)
#define CYLINDER_LOW_REG   (IDECS0 + 4)
#define CYLINDER_HIGH_REG   (IDECS0 + 5)
#define DISK_HEAD_REG   (IDECS0 + 6)
#define COMMAND_REG   (IDECS0 + 7)
#define STATUS_REG   (IDECS0 + 7)
#define LBA_0_7   (IDECS0 + 3)
#define LBA_8_15   (IDECS0 + 4)
#define LBA_16_23   (IDECS0 + 5)
#define CF_ERROR_REG   (IDECS1 + 0)
#define CONTROL_REG   (IDECS1 + 6)
#define ALTERNATE_STATUS   (IDECS1 + 6)
#define STATUS_BUSY   0x80
#define STATUS_DRIVE_READY   0x40
#define STATUS_DEVIDE_FAULT   0x20
#define STATUS_SEEK_COMPLETE   0x10
#define STATUS_DATA_REQUEST   0x08
#define STATUS_CORRECTED_DATA   0x04
#define STATUS_INDEX   0x02
#define STATUS_ERROR   0x01
#define ERROR_CRC   0x80
#define ERROR_UNC   0x40
#define ERROR_IDN   0x10
#define ERROR_ABT   0x04
#define ERROR_T0N   0x02
#define ERROR_AMN   0x01
#define COMMAND_DEVICE_INFO   0xEC
#define COMMAND_DEVICE_INFO_P   0xA1
#define COMMAND_READ_SECTORS   0x20
#define COMMAND_WRITE_SECTORS   0x30
#define COMMAND_RECALIBRATE   0x10
#define COMMAND_DIAG   0x90
#define SERIAL_SIZE   20
#define REV_SIZE   8
#define MODEL_SIZE   40
#define ATAPI_CMD_READ_CAPACITY   0x25
#define ATAPI_CMD_MODE_SELECT   0x55
#define ATAPI_CMD_MODE_SENSE   0x5A
#define ATAPI_CMD_READ12   0xA8
#define ATAPI_CMD_SET_CD_SPEED   0xBB

Define Documentation

#define IDE_SUPPORT_CHS   0

Definition at line 53 of file idep.h.

#define IDE_BASE_ADDRESS   0xE000

Definition at line 55 of file idep.h.

Referenced by IDEInit().

#define IDECS0   0x0000

Definition at line 56 of file idep.h.

#define IDECS1   0x0500

Definition at line 57 of file idep.h.

#define DATA_WRITE_REG_LOW   (IDECS0 + 0x0100)

Definition at line 59 of file idep.h.

#define DATA_WRITE_REG_HIGH   (IDECS0 + 0x0200)

Definition at line 60 of file idep.h.

#define DATA_READ_REG_LOW   (IDECS0 + 0x0300)

Definition at line 62 of file idep.h.

#define DATA_READ_REG_HIGH   (IDECS0 + 0x0400)

Definition at line 63 of file idep.h.

#define ERROR_REG   (IDECS0 + 1)

Definition at line 65 of file idep.h.

#define FEATURE_REG   (IDECS0 + 1)

Definition at line 66 of file idep.h.

#define SECTOR_COUNT_REG   (IDECS0 + 2)

Definition at line 67 of file idep.h.

#define SECTOR_REG   (IDECS0 + 3)

Definition at line 68 of file idep.h.

#define CYLINDER_LOW_REG   (IDECS0 + 4)

Definition at line 69 of file idep.h.

#define CYLINDER_HIGH_REG   (IDECS0 + 5)

Definition at line 70 of file idep.h.

#define DISK_HEAD_REG   (IDECS0 + 6)

Definition at line 71 of file idep.h.

#define COMMAND_REG   (IDECS0 + 7)

Definition at line 72 of file idep.h.

#define STATUS_REG   (IDECS0 + 7)

Definition at line 73 of file idep.h.

#define LBA_0_7   (IDECS0 + 3)

Definition at line 75 of file idep.h.

#define LBA_8_15   (IDECS0 + 4)

Definition at line 76 of file idep.h.

#define LBA_16_23   (IDECS0 + 5)

Definition at line 77 of file idep.h.

#define CF_ERROR_REG   (IDECS1 + 0)

Definition at line 79 of file idep.h.

#define CONTROL_REG   (IDECS1 + 6)

Definition at line 81 of file idep.h.

#define ALTERNATE_STATUS   (IDECS1 + 6)

Definition at line 82 of file idep.h.

#define STATUS_BUSY   0x80

Definition at line 84 of file idep.h.

#define STATUS_DRIVE_READY   0x40

Definition at line 85 of file idep.h.

#define STATUS_DEVIDE_FAULT   0x20

Definition at line 86 of file idep.h.

#define STATUS_SEEK_COMPLETE   0x10

Definition at line 87 of file idep.h.

#define STATUS_DATA_REQUEST   0x08

Definition at line 88 of file idep.h.

#define STATUS_CORRECTED_DATA   0x04

Definition at line 89 of file idep.h.

#define STATUS_INDEX   0x02

Definition at line 90 of file idep.h.

#define STATUS_ERROR   0x01

Definition at line 91 of file idep.h.

#define ERROR_CRC   0x80

Definition at line 93 of file idep.h.

#define ERROR_UNC   0x40

Definition at line 94 of file idep.h.

#define ERROR_IDN   0x10

Definition at line 95 of file idep.h.

#define ERROR_ABT   0x04

Definition at line 96 of file idep.h.

#define ERROR_T0N   0x02

Definition at line 97 of file idep.h.

#define ERROR_AMN   0x01

Definition at line 98 of file idep.h.

#define COMMAND_DEVICE_INFO   0xEC

Definition at line 100 of file idep.h.

#define COMMAND_DEVICE_INFO_P   0xA1

Definition at line 101 of file idep.h.

#define COMMAND_READ_SECTORS   0x20

Definition at line 102 of file idep.h.

#define COMMAND_WRITE_SECTORS   0x30

Definition at line 103 of file idep.h.

#define COMMAND_RECALIBRATE   0x10

Definition at line 104 of file idep.h.

#define COMMAND_DIAG   0x90

Definition at line 105 of file idep.h.

#define SERIAL_SIZE   20

Definition at line 107 of file idep.h.

#define REV_SIZE   8

Definition at line 108 of file idep.h.

#define MODEL_SIZE   40

Definition at line 109 of file idep.h.

#define ATAPI_CMD_READ_CAPACITY   0x25

Definition at line 114 of file idep.h.

#define ATAPI_CMD_MODE_SELECT   0x55

Definition at line 115 of file idep.h.

#define ATAPI_CMD_MODE_SENSE   0x5A

Definition at line 116 of file idep.h.

#define ATAPI_CMD_READ12   0xA8

Definition at line 117 of file idep.h.

Referenced by IDEReadSectors().

#define ATAPI_CMD_SET_CD_SPEED   0xBB

Definition at line 118 of file idep.h.