/[pearpc]/src/io/ide/ide.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /src/io/ide/ide.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Wed Sep 5 17:11:21 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/plain
File size: 1450 byte(s)
import upstream CVS
1 /*
2 * PearPC
3 * ide.h
4 *
5 * Copyright (C) 2003 Sebastian Biallas (sb@biallas.net)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #ifndef __IO_IDE_H__
22 #define __IO_IDE_H__
23
24 #include "system/types.h"
25 #include "system/display.h"
26 #include "idedevice.h"
27 #include "cd.h"
28
29 /*
30 * IDE is handled by PCI and therefore has no base address
31 */
32
33 enum IDEProtocol {
34 IDE_ATA,
35 IDE_ATAPI,
36 };
37
38 struct IDEConfig {
39 bool installed;
40 IDEProtocol protocol;
41 bool lba;
42 union {
43 struct {
44 int cyl;
45 int heads;
46 int spt;
47 } hd;
48 struct {
49 Sense sense;
50 struct {
51 uint8 command;
52 int drq_bytes;
53 int total_remain;
54 } atapi;
55 int next_lba;
56 int remain;
57 bool dma;
58 } cdrom;
59 };
60 int bps;
61 IDEDevice *device;
62 };
63
64 IDEConfig *ide_get_config(int disk);
65
66 void ide_init();
67 void ide_done();
68 void ide_init_config();
69
70 #endif
71

  ViewVC Help
Powered by ViewVC 1.1.26