; Copyright 2003 Tematic Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
#include "Global/Services.h"
#include "../Version"

initialisation-code:	module_init

finalisation-code:  	module_final

service-call-handler:	module_services	Service_ResourceFSStarted,
					Service_ResourceFSStarting,
					Service_PCI,
					Service_USB

title-string:	    	USBDriver

help-string:	     	USBDriver  USBDriverModule_MajorVersion_CMHG

date-string:	    	USBDriverModule_Module_Date_CMHG

#define HELPFILE(M) "Resources:$." #M
#define XHELPFILE(M) HELPFILE(M)
international-help-file: XHELPFILE(MSGLOC)

command-keyword-table:	module_commands

#ifdef USB_DEBUG
USBDebug(       min-args:1, max-args:3,
                international:,help-text:"HUSBDBG",invalid-syntax:"SUSBDBG"),
#endif

USBBuses(       min-args:0, max-args:0,
                international:,help-text:"HUSBBUS",invalid-syntax:"SUSBBUS"),

USBDevices(     min-args:0, max-args:0,
                international:,help-text:"HUSBDEV",invalid-syntax:"SUSBDEV"),

USBDevInfo(     min-args:1, max-args:1,
                international:,help-text:"HUSBDIN",invalid-syntax:"SUSBDIN"),

USBConfInfo(    min-args:1, max-args:1,
                international:,help-text:"HUSBCIN",invalid-syntax:"SUSBCIN"),

USBSetConfig(   min-args:2, max-args:2,
                international:,help-text:"HUSBCON",invalid-syntax:"SUSBCON"),

USBSetInterface(min-args:3, max-args:3,
                international:,help-text:"HUSBINT",invalid-syntax:"SUSBINT"),

#ifdef USB_DEBUG
USBDiscover(    min-args:0, max-args:0,
                international:,help-text:"HUSBDIS",invalid-syntax:"SUSBDIS"),
#endif

USBReset(       min-args:1, max-args:1,
                international:,help-text:"HUSBRES",invalid-syntax:"SUSBRES")


swi-chunk-base-number:	0x54a40

swi-handler-code:   	module_swis

swi-decoding-table: 	USBDriver,
                        RegisterBus,
                        DeRegisterBus,
                        InsertTransfer,
                        TransferComplete,
                        ScheduleSoftInterrupt
;                        IOCtl,
;                        OpenPipe,
;                        ClosePipe,
;                        Transfer,
;                        AllocXfer,
;                        FreeXfer,
;                        SetupXfer,
;                        SetupDefaultXfer,
;                        SetupIsocXfer,
;                        GetXferStatus,
;                        Interface2EndpointDescriptor,
;                        AbortPipe,
;                        ClearEndpointStall,
;                        ClearEndpointStallAsync,
;                        EndpointCount,
;                        Interface2DeviceHandle,
;                        Device2InterfaceHandle,
;                        Pipe2DeviceHandle,
;                        AllocBuffer,
;                        Freebuffer,
;                        GetBuffer,
;                        SyncTransfer,
;                        OpenPipeIntr,
;                        DoRequest,
;                        DoRequestAsync,
;                        DoRequestFlags,
;                        GetInterfaceDescriptor,
;                        GetConfigDescriptor,
;                        SetInterface,
;                        FillDeviceInfo,
;                        GetInterfaceAltindex,
;                        FindIdesc,
;                        FindEdesc,
;                        DevInfo,
;                        GetEndpointDescriptor,
;                        ReloadDeviceDesc


generic-veneers:        driver_entry/driver

vector-handlers:        pointerv_entry/pointerv,
			keyv_entry/keyv,
			softintr_entry/softintr