#ifndef SEND_SCSI_CMD_H #define SEND_SCSI_CMD_H #include struct sizedbuffer { unsigned long len; // Lunghezza del buffer unsigned long actual; // Quanto in effetti è stato trasferito. void * buf; // Il buffer vero e proprio }; extern WORD Send_SCSI_CMD( const STRPTR devicename, const ULONG devunit, const ULONG opendevflags, struct sizedbuffer * cmdbuffer, struct sizedbuffer * databuffer, struct sizedbuffer * sensebuffer, const UBYTE LUN, const UBYTE scsiflags); /* devicename: il nome del device, tipo "gvpscsi.device" o "cybppc.device" devunit: il numero dell'unità, secondo la sintassi descritta nell'include . Importante per la gestione delle LUN. opendevflags: flag aggiuntivi per l'apertura del device. Di solito 0 . LUN: da utilizzarsi solo se si dialoga con vecchie unità SCSI-1. Altrimenti 0 . scsiflags: i flag definiti come in , tipo SCSIF_READ|SCSIF_AUTOSENSE . */ #define SET_LUN_ON_COMMAND(cmd,lun) cmd[1] = ((cmd[1] & 0x1f) | (lun << 5) ) #endif