亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ide.h

?? usb接口的移動硬盤
?? H
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************
   本程序只供學習使用,未經(jīng)作者許可,不得用于其它任何用途
      我的郵箱:computer-lov@tom.com
        歡迎訪問我的blog:  http://computer00.21ic.org

IDE.H File    IDE address and command

Created by Computer-lov
Date: 2005.3.12

Edit date:2006.3.2

Version V1.1
Copyright(C) Computer-lov 2005-2015
All rigths reserved
             
*******************************************************************/

#ifndef __IDE_H__
#define __IDE_H__

void reset_IDE(void);
void read_IDE_16(unsigned char);
void write_IDE_16(unsigned char);
unsigned char read_IDE_8(unsigned char);
void write_IDE_8(unsigned char,unsigned char);
void read_IDE_data(void);
void write_IDE_data(void);
void read_IDE_status(void);
void read_IDE_error(void);
unsigned char wait_IDE_busy(void);
void write_IDE_command(unsigned char);
void soft_reset_IDE(void);
void get_IDE_infromation(void);
void write_IDE_LBA0(unsigned char);
void write_IDE_LBA1(unsigned char);
void write_IDE_LBA2(unsigned char);
void write_IDE_LBA3(unsigned char);
void write_IDE_sector_count(unsigned char);
void read_IDE_buffer(void);
void write_IDE_buffer(void);
void read_IDE_sector(void);
void write_IDE_sector(void);
void IDE_initial(void);
void system_initial(void);
extern unsigned char IDE_Buffer_L,IDE_Buffer_H;
extern unsigned char DISK_CAPACITY[8];

#define set_IDE_address() IDE_ALE=1;IDE_ALE=0;


/*                       TABLE 6-1:  INTERFACE SIGNALS 
 +----------------------------------+                         +-----------+
 |         HOST  I/O                |                         | DRIVE I/O | 
 |         CONNECTOR                |                         | CONNECTOR | 
 |                                  |                         |           | 
 | HOST RESET                     1 | -----  RESET-  -------->| 1         | 
 |                                2 | -----  Ground  -------- | 2         | 
 | HOST DATA BUS BIT 7            3 |<-----  DD7  ----------->| 3         | 
 | HOST DATA BUS BIT 8            4 |<-----  DD8  ----------->| 4         | 
 | HOST DATA BUS BIT 6            5 |<-----  DD6  ----------->| 5         | 
 | HOST DATA BUS BIT 9            6 |<-----  DD9  ----------->| 6         | 
 | HOST DATA BUS BIT 5            7 |<-----  DD5  ----------->| 7         | 
 | HOST DATA BUS BIT 10           8 |<-----  DD10  ---------->| 8         | 
 | HOST DATA BUS BIT 4            9 |<-----  DD4  ----------->| 9         | 
 | HOST DATA BUS BIT 11          10 |<-----  DD11  ---------->| 10        | 
 | HOST DATA BUS BIT 3           11 |<-----  DD3  ----------->| 11        | 
 | HOST DATA BUS BIT 12          12 |<-----  DD12  ---------->| 12        | 
 | HOST DATA BUS BIT 2           13 |<-----  DD2  ----------->| 13        | 
 | HOST DATA BUS BIT 13          14 |<-----  DD13  ---------->| 14        | 
 | HOST DATA BUS BIT 1           15 |<-----  DD1  ----------->| 15        | 
 | HOST DATA BUS BIT 14          16 |<-----  DD14  ---------->| 16        | 
 | HOST DATA BUS BIT 0           17 |<-----  DD0  ----------->| 17        | 
 | HOST DATA BUS BIT 15          18 |<-----  DD15  ---------->| 18        | 
 |                               19 | -----  Ground  -------- | 19        | 
 |                               20 | -----  (keypin)  ------ | 20        | 
 | DMA REQUEST                   21 |<-----  DMARQ  --------- | 21        | 
 |                               22 | -----  Ground  -------- | 22        | 
 | HOST I/O WRITE                23 | -----  DIOW-  --------->| 23        | 
 |                               24 | -----  Ground  -------- | 24        | 
 | HOST I/O READ                 25 | -----  DIOR-  --------->| 25        | 
 |                               26 | -----  Ground  -------- | 26        | 
 | I/O CHANNEL READY             27 |<-----  IORDY  --------- | 27        | 
 | SPINDLE SYNC or CABLE SELECT  28 |*---- SPSYNC:CSEL  -----*| 28        | 
 | DMA ACKNOWLEDGE               29 | -----  DMACK-  -------->| 29        | 
 |                               30 | -----  Ground  -------- | 30        | 
 | HOST INTERRUPT REQUEST        31 |<-----  INTRQ  --------- | 31        | 
 | HOST 16 BIT I/O               32 |<-----  IOCS16-  ------- | 32        | 
 | HOST ADDRESS BUS BIT 1        33 | -----  DA1  ----------->| 33        | 
 | PASSED DIAGNOSTICS            34 |*-----  PDIAG-  --------*| 34        | 
 | HOST ADDRESS BUS BIT 0        35 | -----  DAO  ----------->| 35        | 
 | HOST ADDRESS BUS BIT 2        36 | -----  DA2  ----------->| 36        | 
 | HOST CHIP SELECT 0            37 | -----  CS1FX-  -------->| 37        | 
 | HOST CHIP SELECT 1            38 | -----  CS3FX-  -------->| 38        | 
 | DRIVE ACTIVE/DRIVE 1 PRESENT  39 |<-----  DASP-  ---------*| 39        | 
 |                               40 | -----  Ground  -------- | 40        | 
 +----------------------------------+                         +-----------+

                     * Drive Intercommunication Signals
*/

/*
DATA BUS 0-7   <====>  P1
DATA BUS 8-16  <====>  P2
IORDY  ---->P34
ALE   <-----P33
DIOW  <-----P36
DIOR  <-----P37
*/

#include <at89X52.h>


#define IDE_DATA_L P1
#define IDE_DATA_H P2
#define IDE_IORDY  P3_4
#define IDE_DIOW   P3_0
#define IDE_DIOR   P3_1
#define IDE_ALE    P3_3



/*
Logic conventions are:   A = signal asserted
                         N = signal negated
                         x = does not matter which it is

            TABLE 7-1:  I/O PORT FUNCTIONS/SELECTION ADDRESSES 
 +-------------------------------+-----------------------------------------+
 |         Addresses             |                 Functions               |
 |CS1FX-|CS3FX-| DA2 | DA1 | DA0 |    READ (DIOR-)     |   WRITE (DIOW-)   |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |                                        Control Block Registers          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |  N   |  N   |  x  |  x  |  x  | Data Bus High Imped | Not used          |
 |  N   |  A   |  0  |  x  |  X  | Data Bus High Imped | Not used          |
 |  N   |  A   |  1  |  0  |  x  | Data Bus High Imped | Not used          |
 |  N   |  A   |  1  |  1  |  0  | Alternate Status    | Device Control    | 
 |  N   |  A   |  1  |  1  |  1  | Drive Address       | Not used          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |                                        Command Block Registers          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |  A   |  N   |  0  |  0  |  0  | Data                | Data              |
 |  A   |  N   |  0  |  0  |  1  | Error Register      | Features          |
 |  A   |  N   |  0  |  1  |  0  | Sector Count        | Sector Count      |
 |  A   |  N   |  0  |  1  |  1  | Sector Number       | Sector Number     | 
 |  A   |  N   |  0  |  1  |  1  | * LBA Bits  0- 7    | * LBA Bits  0- 7  |
 |  A   |  N   |  1  |  0  |  0  | Cylinder Low        | Cylinder Low      |
 |  A   |  N   |  1  |  0  |  0  | * LBA Bits  8-15    | * LBA Bits  8-15  |
 |  A   |  N   |  1  |  0  |  1  | Cylinder High       | Cylinder High     | 
 |  A   |  N   |  1  |  0  |  1  | * LBA Bits 16-23    | * LBA Bits 16-23  |
 |  A   |  N   |  1  |  1  |  0  | Drive/Head          | Drive/Head        |
 |  A   |  N   |  1  |  1  |  0  | * LBA Bits 24-27    | * LBA Bits 24-27  |
 |  A   |  N   |  1  |  1  |  1  | Status              | Command           |
 |  A   |  A   |  x  |  x  |  x  | Invalid Address     | Invalid Address   |
 +------+------+-----+-----+-----+---------------------+-------------------+
                      * Mapping of registers in LBA Mode
*/

/*
DA0   ----->   P10
DA1   ----->   P11
DA3   ----->   P12
CS1FX ----->   P13
CS3FX ----->   P14
CSEL  ----->   P15
RESET ----->   P17
*/

#define IDE_Address                 P1

/*
#define IDE_Bus_Not_Use             0x00
#define IDE_Alternate_Status        0x16
#define IDE_Device_Control          0x16
#define IDE_Drive_Address           0x17

#define IDE_Data                    0x08
#define IDE_Error_Register          0x09
#define IDE_Features                0x09
#define IDE_Sector_Count            0x0A
#define IDE_Sector_Nuber            0x0B
#define IDE_LBA_Bits_0_7            0x0B
#define IDE_Cylinder_Low            0x0C
#define IDE_LBA_Bits_8_15           0x0C
#define IDE_Cylinder_High           0x0D
#define IDE_LBA_Bits_16_23          0x0D
#define IDE_Drive_Head              0x0E
#define IDE_LBA_Bits_24_27          0x0E
#define IDE_Status                  0x0F
#define IDE_Command                 0x0F
#define IDE_Reset                   0x80
*/

#define IDE_Bus_Not_Use             0x98
#define IDE_Alternate_Status        0x8E
#define IDE_Device_Control          0x8E
#define IDE_Drive_Address           0x8F

#define IDE_Data                    0x90
#define IDE_Error_Register          0x91
#define IDE_Features                0x91
#define IDE_Sector_Count            0x92
#define IDE_Sector_Nuber            0x93
#define IDE_LBA_Bits_0_7            0x93
#define IDE_Cylinder_Low            0x94
#define IDE_LBA_Bits_8_15           0x94
#define IDE_Cylinder_High           0x95
#define IDE_LBA_Bits_16_23          0x95
#define IDE_Drive_Head              0x96
#define IDE_LBA_Bits_24_27          0x96
#define IDE_Status                  0x97
#define IDE_Command                 0x97

#define IDE_Reset                   0x18

/*
 Alternate Status Register
         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |  BSY  | DRDY  |  DWF  |  DSC  |  DRQ  | CORR  |  IDX  |  ERR  | 
     +-------+-------+-------+-------+-------+-------+-------+-------+
*/

/*
7.2.2  Command Register 

This register contains the command code being sent to the drive. Command 
execution begins immediately after this register is written. The executable 
commands, the command codes, and the necessary parameters for each command are 
listed in Table 9-1.
*/

/*
7.2.3  Cylinder High Register

This register contains the high order bits of the starting cylinder address 
for any disk access. At the end of the command, this register is updated to 
reflect the current cylinder number. The most significant bits of the cylinder 
address shall be loaded into the cylinder high Register. 

In LBA Mode this register contains Bits 16-23. At the end of the command, this 
register is updated to reflect the current LBA Bits 16-23.

  NOTE: Prior to the introduction of this standard, only the lower 2 bits of 
        this register were valid, limiting cylinder address to 10 bits i.e. 
        1,024 cylinders.
*/

/*
7.2.4  Cylinder Low Register

This register contains the low order 8 bits of the starting cylinder address 
for any disk access. At the end of the command, this register is updated to 
reflect the current cylinder number. 

In LBA Mode this register contains Bits 8-15. At the end of the command, this 
register is updated to reflect the current LBA Bits 8-15.

7.2.5  Data Register

This 16-bit register is used to transfer data blocks between the device data 
buffer and the host. It is also the register through which sector information 
is transferred on a Format Track command. Data transfers may be either PIO or 
DMA. 
*/

/*
7.2.6  Device Control Register

The bits in this register are as follows: 

         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |   x   |   x   |   x   |   x   |   1   | SRST  |  nIEN |   0   | 
     +-------+-------+-------+-------+-------+-------+-------+-------+

 - SRST is the host software reset bit. The drive is held reset when this bit 
   is set. If two disk drives are daisy chained on the interface, this bit 
   resets both simultaneously. Drive 1 is not required to execute the DASP- 
   handshake procedure.
 - nIEN is the enable bit for the drive interrupt to the host. When nIEN=0, 
   and the drive is selected, INTRQ shall be enabled through a tri-state 
   buffer. When nIEN=1, or the drive is not selected, the INTRQ signal shall 
   be in a high impedance state. 

*/


/*
7.2.7  Drive Address Register

This register contains the inverted drive select and head select addresses of 
the currently selected drive. The bits in this register are as follows: 

         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |  HiZ  |  nWTG |  nHS3 |  nHS2 |  nHS1 |  nHS0 |  nDS1 |  nDS0 | 
     +-------+-------+-------+-------+-------+-------+-------+-------+

 - HiZ shall always be in a high impedance state. 
 - nWTG is the Write Gate bit. When writing to the disk drive is in progress, 
   nWTG=0.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线观看 | 99久久久国产精品| 欧美一区二区免费视频| 香蕉影视欧美成人| 欧美又粗又大又爽| 亚洲精品免费播放| 91美女片黄在线观看| 国产精品国产三级国产aⅴ原创| 激情五月播播久久久精品| 91精品视频网| 午夜伦理一区二区| 日韩女优av电影| 久久福利资源站| 精品三级在线观看| 国产精品系列在线播放| 亚洲三级在线免费观看| 在线一区二区视频| 免费av网站大全久久| 精品久久免费看| 国产精品原创巨作av| 欧美国产日韩亚洲一区| 99re视频这里只有精品| 亚洲国产cao| 久久精品在线观看| 在线一区二区三区| 蜜桃一区二区三区在线| 亚洲精品一区二区三区精华液| 国产精品99久久久久久有的能看| 亚洲婷婷综合色高清在线| 欧美日韩一本到| 国产91精品久久久久久久网曝门 | 蜜臂av日日欢夜夜爽一区| 国产欧美日韩三级| 欧美视频在线一区二区三区| 激情久久五月天| 午夜日韩在线电影| 亚洲色图欧美在线| 国产亚洲成aⅴ人片在线观看| 欧美又粗又大又爽| 成人av免费在线| 国产美女视频91| 国产精品国模大尺度视频| 日韩欧美一区在线观看| 欧美日韩一二三| 95精品视频在线| 白白色 亚洲乱淫| 国产麻豆精品久久一二三| 日本不卡一二三区黄网| 日本不卡一区二区三区高清视频| 亚洲图片另类小说| 中文字幕在线一区二区三区| 久久九九久精品国产免费直播| 91精品国产色综合久久ai换脸 | 国产精品久久久久久妇女6080 | 日本一区二区视频在线观看| 欧美成人vps| 久久五月婷婷丁香社区| 久久久一区二区三区| 国产欧美综合在线观看第十页| 制服丝袜中文字幕亚洲| 波多野结衣亚洲| 麻豆91在线播放免费| 久久久三级国产网站| 精品国产免费视频| 国产亚洲人成网站| 亚洲精品成人a在线观看| 亚洲国产aⅴ成人精品无吗| 欧美aaa在线| 国产做a爰片久久毛片| 风间由美一区二区三区在线观看 | 日韩一区二区三| 欧美第一区第二区| 中文字幕一区二区三区不卡| 一区二区免费看| 日本欧美加勒比视频| 色一区在线观看| 日韩欧美亚洲国产精品字幕久久久| 久久久久久久精| 成人免费一区二区三区在线观看| 亚洲第一福利视频在线| 精品一区二区免费| 色综合天天视频在线观看| 日韩欧美在线观看一区二区三区| 久久精品日产第一区二区三区高清版| 国产精品国产a| 久久99国产乱子伦精品免费| 成人动漫在线一区| 99久久精品情趣| 久久亚洲免费视频| 日韩国产高清在线| 色综合久久久久久久久| 久久综合久久综合九色| 无码av中文一区二区三区桃花岛| 成人教育av在线| 精品嫩草影院久久| 亚洲一区在线视频| 99久久精品免费观看| 中文字幕一区二区三区视频| av中文字幕在线不卡| 自拍偷拍亚洲综合| 色婷婷久久久亚洲一区二区三区| 亚洲欧美区自拍先锋| 欧洲国内综合视频| 婷婷中文字幕综合| 国产亚洲精品aa午夜观看| 欧美欧美欧美欧美| 国模一区二区三区白浆| 国产精品色在线观看| 成人免费视频app| 亚洲一区二区三区不卡国产欧美| 欧美另类z0zxhd电影| 另类小说欧美激情| 国产午夜精品福利| 色欧美日韩亚洲| 国产福利电影一区二区三区| 亚洲一区二区三区影院| 欧美一级精品在线| 成人综合婷婷国产精品久久免费| 亚洲欧美乱综合| 日韩欧美资源站| 色综合久久久久综合| 日韩精彩视频在线观看| 国产精品免费视频一区| 91精品国产美女浴室洗澡无遮挡| 国产成人精品免费看| 另类调教123区| 亚洲一区二区欧美日韩 | 国产日韩欧美精品电影三级在线| 精品视频1区2区3区| 99精品国产99久久久久久白柏| 久久91精品国产91久久小草| 亚洲一二三级电影| 中文字幕亚洲区| 国产精品热久久久久夜色精品三区| 欧美精品在欧美一区二区少妇| 99久久精品国产毛片| 国产成都精品91一区二区三| 久久91精品久久久久久秒播| 日韩国产精品久久久久久亚洲| 亚洲综合视频网| 亚洲精选一二三| 综合分类小说区另类春色亚洲小说欧美| 日韩免费高清电影| 精品久久国产字幕高潮| 精品理论电影在线| 国产丝袜美腿一区二区三区| 欧美videossexotv100| 欧美精品一区二区三区视频| 久久先锋影音av鲁色资源网| 久久综合网色—综合色88| 久久久国产精品午夜一区ai换脸| 久久久91精品国产一区二区精品| 国产香蕉久久精品综合网| 国产精品你懂的在线欣赏| 亚洲乱码国产乱码精品精可以看| 亚洲男人的天堂在线观看| 天涯成人国产亚洲精品一区av| 久久精品av麻豆的观看方式| 国产黄色成人av| 欧美日韩精品一区二区天天拍小说| 3751色影院一区二区三区| 国产亚洲福利社区一区| 亚洲愉拍自拍另类高清精品| 日产国产高清一区二区三区| 国产福利不卡视频| 欧美剧情片在线观看| 国产色91在线| 亚洲美女区一区| 国产福利电影一区二区三区| 成人动漫一区二区| 欧美日产在线观看| 日本一区二区三级电影在线观看| 国产人伦精品一区二区| 欧美国产精品v| 免费av网站大全久久| 在线免费观看日本一区| 中文字幕精品一区二区三区精品| 天堂精品中文字幕在线| 99久久综合狠狠综合久久| 欧洲中文字幕精品| 欧美激情一区在线观看| 99久久精品免费看国产免费软件| 日韩一级精品视频在线观看| 日本一区免费视频| 亚洲伊人伊色伊影伊综合网| 99久久国产综合精品色伊| 久久综合狠狠综合久久综合88| 午夜精品在线视频一区| 色噜噜狠狠成人中文综合| 2020国产成人综合网| 日韩av中文在线观看| 色婷婷av一区二区三区gif| 国产精品美日韩| 国产成人精品影院| 精品国产a毛片| 国产精品一区免费视频| 中文字幕不卡一区| 99re成人精品视频| 亚洲人妖av一区二区| 色综合一区二区三区|