source: trunk/src/wnaspi32/aspilib.h@ 4265

Last change on this file since 4265 was 4265, checked in by sandervl, 25 years ago

open + init aspirout during dll load

File size: 2.7 KB
Line 
1//***************************************************************************
2//* *
3//* ASPI Router Library *
4//* *
5//* This is a sample library which shows how to send SRB's to the *
6//* ASPI Router device driver. USE AT YOUR OWN RISK!! *
7//* *
8//* Version 1.01 - June 1997 *
9//* *
10//* Changes since 1.00: *
11//* abort(), AbortSRB added *
12//* *
13//***************************************************************************
14#ifndef _ASPILIB_H_
15#define _ASPILIB_H_
16
17//#include <os2wrap.h>
18#include "srbos2.h"
19
20class scsiObj
21{
22 private:
23 ULONG postSema; // Event Semaphore for posting SRB completion
24 ULONG driver_handle; // file handle for device driver
25 BOOL initSemaphore();
26 BOOL closeSemaphore();
27 BOOL openDriver();
28 BOOL closeDriver();
29 BOOL initBuffer();
30 ULONG hmtxDriver;
31
32 public:
33 scsiObj();
34 ~scsiObj();
35 BOOL init(ULONG bufsize);
36 BOOL close();
37 ULONG rewind(UCHAR id, UCHAR lun);
38 ULONG read(UCHAR id, UCHAR lun, ULONG transfer);
39 ULONG locate(UCHAR id, UCHAR lun, ULONG block);
40 ULONG unload(UCHAR id, UCHAR lun);
41 ULONG write(UCHAR id, UCHAR lun, ULONG transfer);
42 ULONG write_filemarks(UCHAR id, UCHAR lun, BOOL setmark, ULONG count);
43 ULONG space(UCHAR id, UCHAR lun, UCHAR code, ULONG count);
44 ULONG read_position(UCHAR id, UCHAR lun, ULONG* pos, ULONG* partition, BOOL* BOP, BOOL* EOP);
45 ULONG HA_inquiry(UCHAR ha);
46 ULONG getDeviceType(UCHAR ha_num, UCHAR id, UCHAR lun);
47 ULONG testUnitReady(UCHAR id, UCHAR lun);
48 ULONG resetDevice(UCHAR ha_num,UCHAR id, UCHAR lun);
49 ULONG abort();
50 BOOL waitPost();
51 ULONG SendSRBlock(VOID);
52 ULONG getNumHosts();
53 BOOL access(BOOL fWait);
54 BOOL release();
55
56
57 SRBOS2 SRBlock; // SCSI Request Block
58 SRBOS2 AbortSRB; // Abort SRB
59 PVOID buffer; // Our data buffer
60};
61
62extern scsiObj *aspi;
63
64#endif // _ASPILIB_H_
Note: See TracBrowser for help on using the repository browser.