FreeNOS
Data Structures | Macros | Typedefs
ATAController.h File Reference
#include <FreeNOS/User.h>
#include <List.h>
#include <Device.h>

Go to the source code of this file.

Data Structures

struct  IdentifyData
 IDENTIFY data presentation. More...
 
struct  ATADrive
 Represents a Drive on the ATA bus. More...
 
class  ATAController
 AT Attachment (ATA) Host Controller Device. More...
 

Macros

#define IDENTIFY_TEXT_SWAP(field, size)
 Swap ASCII bytes from IDENTIFY. More...
 
ATA I/O Bases.
#define ATA_BASE_CMD0   0x1f0
 First ATA Bus Command I/O Base. More...
 
#define ATA_BASE_CMD1   0x170
 Second ATA Bus Command I/O Base. More...
 
#define ATA_BASE_CTL0   0x3f6
 First ATA Bus Control I/O Base. More...
 
#define ATA_BASE_CTL1   0x376
 Second ATA Bus Control I/O Base. More...
 
ATA Command Registers.
#define ATA_REG_DATA   0
 Data port. More...
 
#define ATA_REG_ERROR   1
 Features and Error info. More...
 
#define ATA_REG_COUNT   2
 Sector Count. More...
 
#define ATA_REG_ADDR0   3
 Partial Disk Sector address. More...
 
#define ATA_REG_ADDR1   4
 Partial Disk Sector address. More...
 
#define ATA_REG_ADDR2   5
 Partial Disk Sector address. More...
 
#define ATA_REG_SELECT   6
 Drive Select bit, Flag bits, Extra address bits. More...
 
#define ATA_REG_CMD   7
 Command port and Regular Status port. More...
 
#define ATA_REG_STATUS   7
 Regular Status port. More...
 
ATA Status Registers.
#define ATA_STATUS_ERROR   0x01
 Error flag (when set). More...
 
#define ATA_STATUS_DATA   0x08
 Drive data ready for transfer. More...
 
#define ATA_STATUS_BUSY   0x80
 Drive is preparing to accept or send data. More...
 
ATA Control Registers.
#define ATA_REG_RESET   0x4
 Software Reset. More...
 
#define ATA_REG_INTR   0x2
 Interrupt Disable. More...
 
ATA Device Selector Flags.
#define ATA_SEL_MASTER   0xa0
 Master Drive in Legacy mode. More...
 
#define ATA_SEL_MASTER_28   0xe0
 Master Drive in 28-bit LBA mode. More...
 
#define ATA_SEL_MASTER_48   0x40
 Master Drive in 48-bit LBA mode. More...
 
ATA Commands.
#define ATA_CMD_IDENTIFY   0xec
 Identifies an ATA device, if any. More...
 
#define ATA_CMD_READ   0x20
 Reads sectors from an ATA device. More...
 

Typedefs

typedef struct IdentifyData IdentifyData
 IDENTIFY data presentation. More...
 
typedef struct ATADrive ATADrive
 Represents a Drive on the ATA bus. More...