revert commit 56204.
[AROS.git] / rom / usb / classes / stir4200 / dev.h
blobb14f6e9fb396311ac75e0b74a8dcaffe8de4db8e
2 /* DEVICE STUFF */
4 #define DEVNAME "usbstir4200.device"
6 #define DEVBASETYPEPTR struct NepSTIrDevBase *
8 /* local protos */
10 AROS_UFP3(DEVBASETYPEPTR, devInit,
11 AROS_UFPA(DEVBASETYPEPTR, base, D0),
12 AROS_UFPA(BPTR, seglist, A0),
13 AROS_UFPA(struct ExecBase *, SysBase, A6));
15 AROS_LD3(DEVBASETYPEPTR, devOpen,
16 AROS_LDA(struct IOIrDAReq *, ioreq, A1),
17 AROS_LDA(ULONG, unitnum, D0),
18 AROS_LDA(ULONG, flags, D1),
19 DEVBASETYPEPTR, base, 1, dev);
21 AROS_LD1(BPTR, devClose,
22 AROS_LDA(struct IOIrDAReq *, ioreq, A1),
23 DEVBASETYPEPTR, base, 2, dev);
25 AROS_LD1(BPTR, devExpunge,
26 AROS_LDA(DEVBASETYPEPTR, extralh, D0),
27 DEVBASETYPEPTR, base, 3, dev);
29 AROS_LD0(DEVBASETYPEPTR, devReserved,
30 DEVBASETYPEPTR, base, 4, dev);
32 AROS_LD1(void, devBeginIO,
33 AROS_LDA(struct IOIrDAReq *, ioreq, A1),
34 DEVBASETYPEPTR, base, 5, dev);
36 AROS_LD1(LONG, devAbortIO,
37 AROS_LDA(struct IOIrDAReq *, ioreq, A1),
38 DEVBASETYPEPTR, base, 6, dev);
40 WORD cmdQueryDevice(struct IOIrDAReq *ioreq,
41 struct NepClassSTIr4200 *ncp,
42 struct NepSTIrDevBase *base);
44 /* Device stuff */
46 /* Reply the iorequest with success
48 #define RC_OK 0
50 /* Magic cookie, don't set error fields & don't reply the ioreq
52 #define RC_DONTREPLY -1
54 struct Unit *Open_Unit(struct IOIrDAReq *ioreq,
55 LONG unitnr,
56 struct NepSTIrDevBase *base);
57 void Close_Unit(struct NepSTIrDevBase *base, struct NepClassSTIr4200 *ncp,
58 struct IOIrDAReq *ioreq);
60 WORD cmdNSDeviceQuery(struct IOStdReq *ioreq, struct NepClassSTIr4200 *ncp, struct NepSTIrDevBase *base);
62 void TermIO(struct IOIrDAReq *ioreq, struct NepSTIrDevBase *base);
65 struct my_NSDeviceQueryResult
67 ULONG DevQueryFormat; /* this is type 0 */
68 ULONG SizeAvailable; /* bytes available */
69 UWORD DeviceType; /* what the device does */
70 UWORD DeviceSubType; /* depends on the main type */
71 const UWORD *SupportedCommands; /* 0 terminated list of cmd's */