usb_plat/usb_shai_api/inc/usb_peripheral_shai.h
changeset 51 eaaed528d5fd
parent 36 1a2a19ee918d
child 59 bbdce6bffaad
equal deleted inserted replaced
46:613028a7da24 51:eaaed528d5fd
    17 
    17 
    18 /** @file
    18 /** @file
    19     
    19     
    20     @brief USB Peripheral SHAI header
    20     @brief USB Peripheral SHAI header
    21     
    21     
    22     @version 0.3.0
    22     @version 0.4.0
    23  
    23  
    24     Abstract interface for USB Peripheral Controller.
    24     Abstract interface for USB Peripheral Controller.
    25  
    25  
    26     @publishedDeviceAbstraction
    26     @publishedDeviceAbstraction
    27   
    27   
    41  * confirm a certain definition is available, if needed. This can for
    41  * confirm a certain definition is available, if needed. This can for
    42  * example make it possible for a new PSL to support compilation in an
    42  * example make it possible for a new PSL to support compilation in an
    43  * older environment with old USB SHAI version that is missing some
    43  * older environment with old USB SHAI version that is missing some
    44  * new definitions.
    44  * new definitions.
    45  */
    45  */
    46 #define USB_PERIPHERAL_SHAI_VERSION 0x030
    46 #define USB_PERIPHERAL_SHAI_VERSION 0x040
    47 
    47 
    48 // The namespace is documented in file usb_common_shai.h, so it is not
    48 // The namespace is documented in file usb_common_shai.h, so it is not
    49 // repeated here
    49 // repeated here
    50 namespace UsbShai
    50 namespace UsbShai
    51     {
    51     {
   763          * @return KErrNone if endpoint successfully configured; KErrArgument if
   763          * @return KErrNone if endpoint successfully configured; KErrArgument if
   764          *         endpoint number or endpoint info invalid; otherwise one of 
   764          *         endpoint number or endpoint info invalid; otherwise one of 
   765          *         the system-wide error codes.
   765          *         the system-wide error codes.
   766          */
   766          */
   767         virtual TInt ConfigureEndpoint(TInt aRealEndpoint, 
   767         virtual TInt ConfigureEndpoint(TInt aRealEndpoint, 
   768                                      const TUsbPeripheralEndpointInfo& aEndpointInfo) = 0;
   768                                        const TUsbPeripheralEndpointInfo& aEndpointInfo) = 0;
   769         
   769         
   770         /** 
   770         /** 
   771          * De-configures (disables) an endpoint (incl. Ep0).
   771          * De-configures (disables) an endpoint (incl. Ep0).
   772          *
   772          *
   773          * @param aRealEndpoint The number of the endpoint to be disabled.
   773          * @param aRealEndpoint The number of the endpoint to be disabled.
   966          * Tasks to be carried out here might include:
   966          * Tasks to be carried out here might include:
   967          *     - resetting the whole peripheral controller design
   967          *     - resetting the whole peripheral controller design
   968          *     - enabling the peripheral controller's clock
   968          *     - enabling the peripheral controller's clock
   969          *     - binding & enabling the peripheral controller (primary) interrupt
   969          *     - binding & enabling the peripheral controller (primary) interrupt
   970          *     - write meaningful values to some general controller registers
   970          *     - write meaningful values to some general controller registers
   971          *     - enabling the USB Reset interrupt
   971          *     - enabling the USB Reset, Suspend, and Resume interrupts
   972          *     - enabling the peripheral controller proper (for instance by 
   972          *     - enabling the peripheral controller proper (for instance by 
   973          *       setting an Enable bit).
   973          *       setting an Enable bit).
   974          *
   974          *
   975          * This function is also used in an OTG environment when the
   975          * This function is also used in an OTG environment when the
   976          * peripheral stack becomes enabled and the controller needs
   976          * peripheral stack becomes enabled and the controller needs
  1153          * Controller interface to supply the PSL a reference to PIL 
  1153          * Controller interface to supply the PSL a reference to PIL 
  1154          * callback interface to be used for reporting peripheral events.
  1154          * callback interface to be used for reporting peripheral events.
  1155          *
  1155          *
  1156          * @param aPeripheralControllerIf Reference to the Peripheral
  1156          * @param aPeripheralControllerIf Reference to the Peripheral
  1157          *   Controller interface implemented by the registering PSL.
  1157          *   Controller interface implemented by the registering PSL.
       
  1158          *   The PIL layer requires that the supplied reference
       
  1159          *   remains valid indefinitely, as the Peripheral Controller
       
  1160          *   cannot unregister.
  1158          *
  1161          *
  1159          * @param aProperties Reference to an object describing the
  1162          * @param aProperties Reference to an object describing the
  1160          *   static properties of the Peripheral Controller. PIL
  1163          *   static properties of the Peripheral Controller. The PIL
  1161          *   layer requires that the supplied reference remains valid
  1164          *   takes a copy and the PSL is free to release the properties
  1162          *   indefinitely, as a Peripheral Controller cannot unregister.
  1165          *   object upon return.
  1163          *
  1166          *
  1164          * @lib usbperipheralpil.lib
  1167          * @lib usbperipheralpil.lib
  1165          */
  1168          */
  1166         IMPORT_C static void RegisterPeripheralController(MPeripheralControllerIf& aPeripheralControllerIf, 
  1169         IMPORT_C static void RegisterPeripheralController(
  1167                                                       const TPeripheralControllerProperties& aProperties );
  1170             MPeripheralControllerIf& aPeripheralControllerIf, 
       
  1171             const TPeripheralControllerProperties& aProperties );
  1168     
  1172     
  1169         private:
  1173         private:
  1170         /**
  1174         /**
  1171          *  No instance of this class need to be created
  1175          *  No instance of this class need to be created
  1172          */
  1176          */