00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ATADEV_H
00024 #define ATADEV_H
00025
00026 #include "global.h"
00027 #include "membus.h"
00028 #include "device.h"
00029 #include "atadevconf.h"
00030
00031
00032
00033 #define ATA_REG_DATA 0x00
00034 #define ATA_REG_ERROR 0x01
00035 #define ATA_REG_SECCOUNT 0x02
00036 #define ATA_REG_STARTSEC 0x03
00037 #define ATA_REG_CYLLO 0x04
00038 #define ATA_REG_CYLHI 0x05
00039 #define ATA_REG_HDDEVSEL 0x06
00040 #define ATA_REG_CMDSTATUS1 0x07
00041 #define ATA_REG_CMDSTATUS2 0x08
00042 #define ATA_REG_ACTSTATUS 0x09
00043
00044
00045
00046
00047 extern const DevBlock_t DevBlockAta;
00048
00049
00050 int atadevInit(void);
00051 int atadevReset(void);
00052
00053 u08 atadevReadReg(u16 reg);
00054 void atadevWriteReg(u16 reg, u08 data);
00055
00056 int atadevReadData(u08 *buffer, int numBytes);
00057 int atadevWriteData(u08 *buffer, int numBytes);
00058
00059 #endif