Search
lxdream.org :: lxdream/test/ide.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/ide.h
changeset 251:3c5953d944e0
prev185:6755a04c447f
author nkeynes
date Wed Dec 20 11:24:16 2006 +0000 (13 years ago)
permissions -rw-r--r--
last change Tidy up the core IDE test case - now passes (usually) on the real thing. Main
surprise was that it seems to always fail the first packet command after a
reset with code 06,29 (drive reset), no matter how long its been since the
reset.
file annotate diff log raw
nkeynes@185
     1
nkeynes@185
     2
struct gdrom_session {
nkeynes@185
     3
    int track;
nkeynes@185
     4
    unsigned int lba;
nkeynes@185
     5
};
nkeynes@185
     6
nkeynes@185
     7
struct gdrom_track {
nkeynes@185
     8
    int mode;
nkeynes@185
     9
    unsigned int lba;
nkeynes@185
    10
};
nkeynes@185
    11
nkeynes@185
    12
struct gdrom_toc {
nkeynes@185
    13
    struct gdrom_track track[99];
nkeynes@185
    14
    unsigned int first_lba;
nkeynes@185
    15
    unsigned int last_lba;
nkeynes@185
    16
    unsigned int leadout_lba;
nkeynes@185
    17
};
nkeynes@185
    18
nkeynes@185
    19
int ide_init();
nkeynes@185
    20
nkeynes@185
    21
int ide_test_ready();
nkeynes@185
    22
nkeynes@185
    23
int ide_sense_error( char *buf );
nkeynes@185
    24
nkeynes@251
    25
int ide_get_sense_code();
nkeynes@251
    26
nkeynes@185
    27
/**
nkeynes@185
    28
 * Retrieve session information. If session == 0, returns the
nkeynes@185
    29
 * end-of-disc information instead.
nkeynes@185
    30
 */
nkeynes@185
    31
int ide_get_session( int session, struct gdrom_session *session_data );
nkeynes@185
    32
nkeynes@185
    33
/**
nkeynes@185
    34
 * Read 1 or more sectors in PIO mode
nkeynes@185
    35
 */
nkeynes@185
    36
int ide_read_sector_pio( unsigned int sector, unsigned int count, int mode,
nkeynes@185
    37
			 char *buf, int length );
nkeynes@185
    38
int ide_read_sector_dma( unsigned int sector, unsigned int count, int mode,
nkeynes@185
    39
			 char *buf, int length );
.