/* usb/sys/events.h
 *
 * (c) 2002 Simtec Electronics
 *
 * Ben Dooks
 *
 * USB service call action codes
 *
 * $Id: events.h,v 1.4 2003/08/07 22:16:25 ben Exp $
 *
 * This Library file is part of the Simtec Electronics USB stack development
 *   suite.
 * Specific licence is granted to use this file by third parties for the
 *   development of USB device drivers.
 *
 */

#ifndef __RISCOS_SYS_USB_EVENTS_H
#define __RISCOS_SYS_USB_EVENTS_H "$Id: events.h,v 1.4 2003/08/07 22:16:25 ben Exp $"

/* ---------- Service calls ---------- */
/** USB system service call number
@memo USB system service call number
*/
#define SERVICE_USB               0x00080C00

/* Service call action codes */
/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_0
*/
#define SERVICE_USB_PIPE_RELEASE         0x00000000

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_1
*/
#define SERVICE_USB_PIPE_EXCLUSIV        0x00000001

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_2
*/
#define SERVICE_USB_CONFIGURATION        0x00000002

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_3
*/
#define SERVICE_USB_INTERFACE            0x00000003

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_4
*/
#define SERVICE_USB_TRANSFER_CAP         0x00000004

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_5
*/
#define SERVICE_USB_POWER_CAP            0x00000005

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_7
*/
#define SERVICE_USB_CONTROLLER_STARTING  0x00000007

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_8
*/
#define SERVICE_USB_CONTROLLER_DYING     0x00000008

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_16
*/
#define SERVICE_USB_MODULE_STARTING      0x00000010

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_17
*/
#define SERVICE_USB_MODULE_DYING         0x00000011

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_18
*/
#define SERVICE_USB_MODULE_WANTS_TO_STOP 0x00000012

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_19
*/
#define SERVICE_USB_MODULE_STOP_RECOVER  0x00000013

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_32
*/
#define SERVICE_USB_HUB_EVENT            0x00000020

/** USB system service call reason code
@memo USB system service call reason code
@see Service_USB_33
*/
#define SERVICE_USB_ROOT_HUB_EVENT       0x00000021

#define SERVICE_USB_OP_TEST       0x00000000
#define SERVICE_USB_OP_CLAIM      0x00000001
#define SERVICE_USB_OP_RELEASE    0x00000002

/* Host controller driver tags */
#define SERVICE_USB_HC_ISP1161         0x00000000

/* Sub Host controller driver tags */
#define SERVICE_USB_SHC_SIMTEC_ISP1161 0x00000000

/* USB Module starting/dying tags */
#define SERVICE_USB_MOD_USB        0x00000000
#define SERVICE_USB_MOD_HC_DRIVER  0x00000001
#define SERVICE_USB_MOD_SHC_DRIVER 0x00000002
#define SERVICE_USB_MOD_DRIVER     0x00000003

/* Hub Events */
#define SERVICE_USB_HUB_ATTACHED   0x00000000
#define SERVICE_USB_HUB_REMOVED    0x00000001
#define SERVICE_USB_HUB_DISABLED   0x00000002
#define SERVICE_USB_HUB_RESET      0x00000003
#define SERVICE_USB_HUB_OC_OCCURED 0x00000004
#define SERVICE_USB_HUB_OC_CLEARED 0x00000005

#endif /* __RISCOS_SYS_USB_EVENTS_H */
