Unify ATAPI and SCSI CD-ROM code.
This commit is contained in:
parent
bc690b3d2f
commit
6ecdd2efd0
19 changed files with 761 additions and 1509 deletions
13
src/ide.h
13
src/ide.h
|
|
@ -16,6 +16,7 @@ extern void ide_sec_enable();
|
|||
extern void ide_pri_disable();
|
||||
extern void ide_sec_disable();
|
||||
extern void ide_set_bus_master(int (*read_sector)(int channel, uint8_t *data), int (*write_sector)(int channel, uint8_t *data), void (*set_irq)(int channel));
|
||||
void ide_irq_raise(struct IDE *ide);
|
||||
|
||||
#include "ide_atapi.h"
|
||||
|
||||
|
|
@ -34,4 +35,16 @@ uint32_t atapi_get_cd_volume(int channel);
|
|||
|
||||
extern device_t ide_device;
|
||||
|
||||
/* Bits of 'atastat' */
|
||||
#define ERR_STAT 0x01
|
||||
#define DRQ_STAT 0x08 /* Data request */
|
||||
#define DSC_STAT 0x10
|
||||
#define SERVICE_STAT 0x10
|
||||
#define READY_STAT 0x40
|
||||
#define BUSY_STAT 0x80
|
||||
|
||||
/* Bits of 'error' */
|
||||
#define ABRT_ERR 0x04 /* Command aborted */
|
||||
#define MCR_ERR 0x08 /* Media change request */
|
||||
|
||||
#endif //__IDE__
|
||||
|
|
|
|||
Loading…
Reference in a new issue