KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
ide.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 navi/ide.h
4 Copyright (C) 2002 Megan 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 Megan as a part of the Navi project.
15
16 \author Megan 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*/
30int 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*/
38int 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*/
48int ide_init(void);
49
50/** \brief Shutdown Navi IDE. */
51void ide_shutdown(void);
52
53#endif /* __NAVI_IDE_H */
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
void ide_shutdown(void)
Shutdown Navi IDE.
int ide_read(uint32 linear, uint32 numsects, void *bufptr)
Read sectors from the hard disk via PIO.
int ide_write(uint32 linear, uint32 numsects, void *bufptr)
Write sectors from the hard disk via PIO.
int ide_init(void)
Initialize Navi IDE.
uint32 ide_num_sectors(void)
Retrieve the number of sectors from the hard disk.
Common integer types.