|
liberis
|
Low-level control of the KING processor's SCSI controller. More...
#include <eris/types.h>Go to the source code of this file.
Enumerations | |
| enum | scsi_low_phase { SCSI_LOW_PHASE_BUS_FREE = 0, SCSI_LOW_PHASE_SELECT = 1, SCSI_LOW_PHASE_DATA_OUT = 2, SCSI_LOW_PHASE_DATA_IN = 3, SCSI_LOW_PHASE_COMMAND = 4, SCSI_LOW_PHASE_STATUS = 5, SCSI_LOW_PHASE_MESSAGE_OUT = 6, SCSI_LOW_PHASE_MESSAGE_IN = 7, SCSI_LOW_PHASE_ILLEGAL = 8 } |
| enum | scsi_low_status { SCSI_LOW_STATUS_MISC = -5, SCSI_LOW_STATUS_NEED_MESSAGE = -4, SCSI_LOW_STATUS_NEED_DATA = -3, SCSI_LOW_STATUS_HAVE_DATA = -2, SCSI_LOW_STATUS_IN_PROGRESS = -1, SCSI_LOW_STATUS_GOOD = 0x0, SCSI_LOW_STATUS_CHECK_CONDITION = 0x2, SCSI_LOW_STATUS_CONDITION_MET = 0x4, SCSI_LOW_STATUS_BUSY = 0x6, SCSI_LOW_STATUS_INTERMEDIATE = 0x10 } |
| enum | scsi_low_cmd { SCSI_LOW_CMD_TEST_UNIT_READY = 0x00, SCSI_LOW_CMD_REQ_SENSE = 0x03, SCSI_LOW_CMD_READ10 = 0x28, SCSI_LOW_CMD_SEEK10 = 0x2B, SCSI_LOW_CMD_PREFETCH10 = 0x34, SCSI_LOW_CMD_READ_SUBQ = 0x42, SCSI_LOW_CMD_READ_TOC = 0x43, SCSI_LOW_CMD_READ_HEADER = 0x44, SCSI_LOW_CMD_PLAY_AUDIO_INDEX = 0x48, SCSI_LOW_CMD_PAUSE = 0x4B } |
Functions | |
| scsi_low_phase | eris_low_scsi_get_phase (void) |
| Get SCSI phase. | |
| scsi_low_status | eris_low_scsi_status (void) |
| Get SCSI status. | |
| void | eris_low_scsi_reset (void) |
| Reset the SCSI drive. | |
| u32 | eris_low_scsi_data_in (u8 *buf, u32 maxlen) |
| Read data from the SCSI drive. | |
| u32 | eris_low_scsi_data_out (u8 *buf, u32 len) |
| Write data to the SCSI drive. | |
| void | eris_low_scsi_begin_dma (u32 kram_addr, u32 size) |
| Begin a DMA from the SCSI drive. | |
| int | eris_low_scsi_check_dma (void) |
| Check if a DMA is in progress. | |
| void | eris_low_scsi_finish_dma (void) |
| Finish a DMA from the SCSI drive. | |
| void | eris_low_scsi_abort (void) |
| Abort the current SCSI operation. | |
| int | eris_low_scsi_command (u8 *cdb, u32 len) |
| Send a command to the SCSI drive. | |
Low-level control of the KING processor's SCSI controller.
Begin a DMA from the SCSI drive.
| kram_addr | Address in KRAM to DMA to. |
| size | How many bytes to transfer (must be a multiple of 2). |
| int eris_low_scsi_check_dma | ( | void | ) |
Check if a DMA is in progress.
Send a command to the SCSI drive.
| cdb | Command bytes. |
| len | Length of the command data. |
Read data from the SCSI drive.
| buf | Buffer to read into. |
| maxlen | Maximum length to read from. |
Write data to the SCSI drive.
| buf | Buffer to write from. |
| len | Length of the buffer. |
| scsi_low_phase eris_low_scsi_get_phase | ( | void | ) |
Get SCSI phase.
| scsi_low_status eris_low_scsi_status | ( | void | ) |
Get SCSI status.
1.7.4