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

# ata.h File Reference

## Detailed Description

Definition in file ata.h.

`#include "global.h"`
`#include "atadev.h"`
`#include "ataconf.h"`

Go to the source code of this file.

## Defines
#define | DRIVE0 0
#define | STANDBY 0
#define | SLEEP 1
#define | IDLE 2
#define | ATA_SR_BSY 0x80
#define | ATA_SR_DRDY 0x40
#define | ATA_SR_DF 0x20
#define | ATA_SR_DSC 0x10
#define | ATA_SR_DRQ 0x08
#define | ATA_SR_CORR 0x04
#define | ATA_SR_IDX 0x02
#define | ATA_SR_ERR 0x01
#define | ATA_ER_UNC 0x40
#define | ATA_ER_MC 0x20
#define | ATA_ER_IDNF 0x10
#define | ATA_ER_MCR 0x08
#define | ATA_ER_ABRT 0x04
#define | ATA_ER_TK0NF 0x02
#define | ATA_ER_AMNF 0x01
#define | ATA_HEAD_USE_LBA 0x40
#define | ATA_CMD_READ 0x20
#define | ATA_CMD_READNR 0x21
#define | ATA_CMD_WRITE 0x30
#define | ATA_CMD_WRITENR 0x31
#define | ATA_CMD_IDENTIFY 0xEC
#define | ATA_CMD_RECALIBRATE 0x10
#define | ATA_CMD_SPINDOWN 0xE0
#define | ATA_CMD_SPINUP 0xE1
#define | ATA_CMD_STANDBY_5SU 0xE2
#define | ATA_CMD_IDLE_5SU 0xE3
#define | ATA_CMD_SLEEP 0xE6
#define | ATA_CMD_STANDBY_01SU 0xF2
#define | ATA_CMD_IDLE_01SU 0xF3
#define | ATA_DISKPARM_CLYS 0x03A6
#define | ATA_DISKPARM_HEADS 0x10
#define | ATA_DISKPARM_SECTORS 0x11
#define | ATA_IDENT_DEVICETYPE 0
#define | ATA_IDENT_CYLINDERS 1
#define | ATA_IDENT_HEADS 3
#define | ATA_IDENT_SECTORS 6
#define | ATA_IDENT_SERIAL 10
#define | ATA_IDENT_FIRMWAREREV 23
#define | ATA_IDENT_MODEL 27
#define | ATA_IDENT_FIELDVALID 53
#define | ATA_IDENT_LBASECTORS 60
#define | ATA_DISKMODE_SPINDOWN 0
#define | ATA_DISKMODE_SPINUP 1
#define | ATA_DISKMODE_SETTIMEOUT 2
#define | ATA_DISKMODE_SLEEP 3
## Typedefs
typedef DiskInfo | DiskInfo_t
## Functions
void | ataInit (DiskInfo_t *disk, DevBlock_t ataif, unsigned char driveno)
void | ataDriveInit (DiskInfo_t *disk)
void | ataDriveSelect (DiskInfo_t *disk)
void | ataSetDrivePowerMode (DiskInfo_t *disk, u08 mode, u08 timeout)
void | ataShowRegisters (DiskInfo_t *disk)
u08 | ataSWReset (DiskInfo_t *disk)
void | ataDiskErr (DiskInfo_t *disk)
u08 | ataStatusWait (DiskInfo_t *disk, u08 mask, u08 waitStatus)
unsigned char | ataReadSectorsCHS (DiskInfo_t *disk, unsigned char Head, unsigned int Track, unsigned char Sector, unsigned int numsectors, unsigned char *Buffer)
unsigned char | ataWriteSectorsCHS (DiskInfo_t *disk, unsigned char Head, unsigned int Track, unsigned char Sector, unsigned int numsectors, unsigned char *Buffer)
unsigned char | ataReadSectorsLBA (DiskInfo_t *disk, unsigned long lba, unsigned int numsectors, unsigned char *Buffer)
unsigned char | ataWriteSectorsLBA (DiskInfo_t *disk, unsigned long lba, unsigned int numsectors, unsigned char *Buffer)
unsigned char | ataReadSectors (DiskInfo_t *disk, unsigned long lba, unsigned int numsectors, unsigned char *Buffer)
unsigned char | ataWriteSectors (DiskInfo_t *disk, unsigned long lba, unsigned int numsectors, unsigned char *Buffer)
## Variables
DiskInfo | GNUC_PACKED