KallistiOS  2.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
ide.h File Reference

External G2 Bus-based IDE support. More...

#include <arch/types.h>

Go to the source code of this file.

Functions

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.
uint32 ide_num_sectors ()
 Retrieve the number of sectors from the hard disk.
int ide_init ()
 Initialize Navi IDE.
void ide_shutdown ()
 Shutdown Navi IDE.

Detailed Description

External G2 Bus-based IDE support.

This file is involved with accessing an IDE controller that is attached to the G2 Bus expansion port. Exact details of how to build such a device have been posted in various places around the Internet. This driver refers to the device built by Dan as a part of the Navi project.

Author:
Dan Potter

Function Documentation

int ide_init ( )

Initialize Navi IDE.

Returns:
0 on success (no error conditions defined).
uint32 ide_num_sectors ( )

Retrieve the number of sectors from the hard disk.

Returns:
The total number of linear sectors.
int ide_read ( uint32  linear,
uint32  numsects,
void *  bufptr 
)

Read sectors from the hard disk via PIO.

Parameters:
linearThe address to begin reading from.
numsectsThe number of sectors to read.
bufptrThe buffer to read into.
Returns:
0 on success, <0 on error.
void ide_shutdown ( )

Shutdown Navi IDE.

int ide_write ( uint32  linear,
uint32  numsects,
void *  bufptr 
)

Write sectors from the hard disk via PIO.

Parameters:
linearThe address to begin writing to.
numsectsThe number of sectors to write.
bufptrThe buffer to write out of.
Returns:
0 on success, <0 on error.