1 #ifndef DEVICES_IRDA_H
    2 #define DEVICES_IRDA_H
    3 /*
    4 **	$VER: irda.h 1.0 (18.04.05)
    5 **
    6 **	standard irda host controller interface device include file
    7 **
    8 **	(C) Copyright 2005 Chris Hodges
    9 **	    All Rights Reserved
   10 */
   11 
   12 #ifndef EXEC_IO_H
   13 #include <exec/io.h>
   14 #endif
   15 
   16 #ifndef EXEC_ERRORS_H
   17 #include <exec/errors.h>
   18 #endif
   19 
   20 #if defined(__GNUC__)
   21 # pragma pack(2)
   22 #endif
   23 
   24 /* IO Request structure */
   25 
   26 struct IOIrDAReq
   27 {
   28     struct IORequest ioir_Req;
   29     ULONG ioir_Actual;         /* Actual bytes transferred */
   30     ULONG ioir_Length;         /* Size of buffer */
   31     APTR  ioir_Data;           /* Pointer to in/out buffer */
   32     ULONG ioir_Baud;           /* IrDA baud rate requested  */
   33     UWORD ioir_NumBOFs;        /* Number of BOFs in SIR */
   34     UBYTE ioir_Address;        /* LAP Address field */
   35     UBYTE ioir_Control;        /* LAP Control field */
   36     APTR  ioir_UserData;       /* private data, may not be touched by hardware driver,
   37                                   do not make assumptions about its contents */
   38 };
   39 
   40 /* non-standard commands */
   41 
   42 #define IRCMD_QUERYDEVICE (CMD_NONSTD+0)
   43 
   44 /* Error codes for io_Error field */
   45 
   46 #define IRIOERR_NO_ERROR      0   /* No error occured */
   47 #define IRIOERR_IRDAOFFLINE   1   /* IrDA non-operational */
   48 #define IRIOERR_HOSTERROR     3   /* Unspecific host error */
   49 #define IRIOERR_TIMEOUT       6   /* No acknoledge on packet */
   50 #define IRIOERR_OVERFLOW      7   /* More data received than expected */
   51 #define IRIOERR_BADPARAMS    11   /* Illegal parameters in request */
   52 #define IRIOERR_OUTOFMEMORY  12   /* Out of auxiliary memory for the driver */
   53 
   54 /* Tags for IRCMD_QUERYDEVICE */
   55 
   56 #define IRA_Dummy          (TAG_USER  + 0x4711)
   57 #define IRA_SuppBaudRate   (IRA_Dummy + 0x01)
   58 #define IRA_SuppDataSize   (IRA_Dummy + 0x02)
   59 #define IRA_Author         (IRA_Dummy + 0x10)
   60 #define IRA_ProductName    (IRA_Dummy + 0x11)
   61 #define IRA_Version        (IRA_Dummy + 0x12)
   62 #define IRA_Revision       (IRA_Dummy + 0x13)
   63 #define IRA_Description    (IRA_Dummy + 0x14)
   64 #define IRA_Copyright      (IRA_Dummy + 0x15)
   65 #define IRA_DriverVersion  (IRA_Dummy + 0x20)
   66 
   67 #if defined(__GNUC__)
   68 # pragma pack()
   69 #endif
   70 
   71 #endif /* DEVICES_IRDA_H */