00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #ifdef FP_SEG
00028 #undef FP_SEG
00029 #endif
00030 #define FP_SEG(ptr) ((unsigned int)(((unsigned long)ptr)>>16))
00031
00032 #ifdef FP_OFF
00033 #undef FP_OFF
00034 #endif
00035 #define FP_OFF(ptr) ((unsigned int)(((unsigned long)ptr)&0xFFFF))
00036 #endif
00037
00038 typedef struct
00039 {
00040 int id;
00041 int sector_size;
00042 int cylinders;
00043 int heads;
00044 int sectors;
00045 } T_DRIVE_PARAM;
00046
00047 extern T_DRIVE_PARAM drive;
00048
00049 void IDE_reset( void );
00050
00051 int IDE_ReadSRAM(unsigned char *bfr);
00052 int IDE_WriteSRAM(unsigned char *bfr);
00053
00054
00055 int IDE_identify(void);
00056
00057
00058 int IDE_read( int cyl,
00059 int head,
00060 int sect,
00061 int cnt,
00062 unsigned char *buf );
00063
00064
00065 int IDE_write( int cyl,
00066 int head,
00067 int sect,
00068 int cnt,
00069 unsigned char *buf );
00070
00071
00072
00073
00074 int IDE_LBA_read( unsigned long sector, int cnt, unsigned char *buf);
00075
00076
00077
00078 int IDE_LBA_write( unsigned long sector, int cnt, unsigned char *buf );
00079
00080
00081