1 /*
    2  *----------------------------------------------------------------------------
    3  *                         Includes for usb class libraries
    4  *----------------------------------------------------------------------------
    5  *                   By Chris Hodges <hodges@in.tum.de>
    6  *
    7  * History
    8  *
    9  *  08-05-2002  - Initial
   10  *  16-10-2004  - Extended some parts
   11  *
   12  */
   13 
   14 #ifndef LIBRARIES_USBCLASS_H
   15 #define LIBRARIES_USBCLASS_H
   16 
   17 #include <exec/types.h>
   18 #include <exec/libraries.h>
   19 #include <dos/dos.h>
   20 #include <utility/tagitem.h>
   21 #include <utility/pack.h>
   22 
   23 /* Types for usbGetAttrs() and usbSetAttrs() */
   24 
   25 #define UGA_CLASS      0x01
   26 #define UGA_BINDING    0x02
   27 #define UGA_CONFIG     0x03
   28 
   29 /* Tags for usbGetAttrs(UGA_CLASS,...) */
   30 
   31 #define UCCA_Dummy           (TAG_USER + 4489)
   32 #define UCCA_Priority        (UCCA_Dummy + 0x01)
   33 #define UCCA_Description     (UCCA_Dummy + 0x02)
   34 #define UCCA_HasClassCfgGUI  (UCCA_Dummy + 0x10)
   35 #define UCCA_HasBindingCfgGUI (UCCA_Dummy + 0x11)
   36 #define UCCA_AfterDOSRestart (UCCA_Dummy + 0x20)
   37 #define UCCA_UsingDefaultCfg (UCCA_Dummy + 0x30)
   38 #define UCCA_SupportsSuspend (UCCA_Dummy + 0x40)
   39 
   40 /* Tags for usbGetAttrs(UGA_BINDING,...) */
   41 
   42 #define UCBA_Dummy           (TAG_USER  + 103)
   43 #define UCBA_UsingDefaultCfg (UCBA_Dummy + 0x30)
   44 
   45 /* Tags for usbGetAttrs(UGA_CONFIG,...) */
   46 
   47 #define UCFA_Dummy          (TAG_USER  + 2612)
   48 
   49 /* Methods for usbDoMethod() */
   50 
   51 #define UCM_AttemptInterfaceBinding 0x0001
   52 #define UCM_ForceInterfaceBinding   0x0002
   53 #define UCM_ReleaseInterfaceBinding 0x0003
   54 #define UCM_AttemptDeviceBinding    0x0004
   55 #define UCM_ForceDeviceBinding      0x0005
   56 #define UCM_ReleaseDeviceBinding    0x0006
   57 #define UCM_OpenCfgWindow           0x0020
   58 #define UCM_CloseCfgWindow          0x0021
   59 #define UCM_OpenBindingCfgWindow    0x0022 /* { bindingĀ } */
   60 #define UCM_CloseBindingCfgWindow   0x0023 /* { binding } */
   61 #define UCM_LocaleAvailableEvent    0x0030
   62 #define UCM_DOSAvailableEvent       0x0031
   63 #define UCM_ConfigChangedEvent      0x0032
   64 #define UCM_SoftRestart             0x0040
   65 #define UCM_HardRestart             0x0041
   66 #define UCM_AttemptSuspendDevice    0x0050 /* success = { bindingĀ } */
   67 #define UCM_AttemptResumeDevice     0x0051 /* success = { bindingĀ } */
   68 
   69 /* only for hubs */
   70 #define UCM_HubPowerCyclePort       0x0f01 /* { device, portnumber } */
   71 #define UCM_HubClassScan            0x0f02 /* { hubbinding } */
   72 #define UCM_HubClaimAppBinding      0x0f03 /* { hubbinding, taglist } */
   73 #define UCM_HubReleaseIfBinding     0x0f04 /* { hubbinding, if } */
   74 #define UCM_HubReleaseDevBinding    0x0f05 /* { hubbinding, device } */
   75 #define UCM_HubDisablePort          0x0f06 /* { device, portnumber } */
   76 #define UCM_HubSuspendDevice        0x0f07 /* { hubbinding, device } */
   77 #define UCM_HubResumeDevice         0x0f08 /* { hubbinding, device } */
   78 
   79 
   80 #endif /* LIBRARIES_USBCLASS_H */