KallistiOS  2.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ide.h
Go to the documentation of this file.
1 /* KallistiOS 2.0.0
2 
3  navi/ide.h
4  Copyright (C) 2002 Dan Potter
5 
6 */
7 
8 /** \file navi/ide.h
9  \brief External G2 Bus-based IDE support.
10 
11  This file is involved with accessing an IDE controller that is attached to
12  the G2 Bus expansion port. Exact details of how to build such a device have
13  been posted in various places around the Internet. This driver refers to the
14  device built by Dan as a part of the Navi project.
15 
16  \author Dan Potter
17 */
18 
19 #ifndef __NAVI_IDE_H
20 #define __NAVI_IDE_H
21 
22 #include <arch/types.h>
23 
24 /** \brief Read sectors from the hard disk via PIO.
25  \param linear The address to begin reading from.
26  \param numsects The number of sectors to read.
27  \param bufptr The buffer to read into.
28  \return 0 on success, <0 on error.
29 */
30 int ide_read(uint32 linear, uint32 numsects, void *bufptr);
31 
32 /** \brief Write sectors from the hard disk via PIO.
33  \param linear The address to begin writing to.
34  \param numsects The number of sectors to write.
35  \param bufptr The buffer to write out of.
36  \return 0 on success, <0 on error.
37 */
38 int ide_write(uint32 linear, uint32 numsects, void *bufptr);
39 
40 /** \brief Retrieve the number of sectors from the hard disk.
41  \returns The total number of linear sectors.
42 */
44 
45 /** \brief Initialize Navi IDE.
46  \return 0 on success (no error conditions defined).
47 */
48 int ide_init();
49 
50 /** \brief Shutdown Navi IDE. */
51 void ide_shutdown();
52 
53 #endif /* __NAVI_IDE_H */