usbdrv/peripheral/public/d32usbcsc.h
changeset 51 eaaed528d5fd
parent 36 1a2a19ee918d
child 59 bbdce6bffaad
equal deleted inserted replaced
46:613028a7da24 51:eaaed528d5fd
   292         ERequestReadDataNotify = 2,     
   292         ERequestReadDataNotify = 2,     
   293         ERequestAlternateDeviceStatusNotify = 3,
   293         ERequestAlternateDeviceStatusNotify = 3,
   294         ERequestReEnumerate = 4,
   294         ERequestReEnumerate = 4,
   295         ERequestEndpointStatusNotify = 5,
   295         ERequestEndpointStatusNotify = 5,
   296          ERequestOtgFeaturesNotify = 6,
   296          ERequestOtgFeaturesNotify = 6,
       
   297  		ERequestChargingPortTypeNotify = 7,
   297         ERequestMaxRequests, // 7
   298         ERequestMaxRequests, // 7
   298 
   299 
   299         ERequestCancel = 0x40000000,
   300         ERequestCancel = 0x40000000,
   300 
   301 
   301         ERequestWriteDataCancel                        = ERequestWriteData                   | ERequestCancel,
   302         ERequestWriteDataCancel                        = ERequestWriteData                   | ERequestCancel,
   302         ERequestReadDataNotifyCancel                = ERequestReadDataNotify              | ERequestCancel,
   303         ERequestReadDataNotifyCancel                = ERequestReadDataNotify              | ERequestCancel,
   303         ERequestAlternateDeviceStatusNotifyCancel     = ERequestAlternateDeviceStatusNotify | ERequestCancel,
   304         ERequestAlternateDeviceStatusNotifyCancel     = ERequestAlternateDeviceStatusNotify | ERequestCancel,
   304         ERequestReEnumerateCancel                     = ERequestReEnumerate                 | ERequestCancel,
   305         ERequestReEnumerateCancel                     = ERequestReEnumerate                 | ERequestCancel,
   305         ERequestEndpointStatusNotifyCancel             = ERequestEndpointStatusNotify        | ERequestCancel,
   306         ERequestEndpointStatusNotifyCancel             = ERequestEndpointStatusNotify        | ERequestCancel,
   306         ERequestOtgFeaturesNotifyCancel             = ERequestOtgFeaturesNotify           | ERequestCancel
   307         ERequestOtgFeaturesNotifyCancel             = ERequestOtgFeaturesNotify           | ERequestCancel,
       
   308         ERequestChargingPortTypeNotifyCancel             = ERequestChargingPortTypeNotify           | ERequestCancel
   307         };
   309         };
   308 
   310 
   309     enum TControl
   311     enum TControl
   310         {
   312         {
   311         // Changing the order of these enums will break BC.
   313         // Changing the order of these enums will break BC.
   381         EControlRemoveStringDescriptor,
   383         EControlRemoveStringDescriptor,
   382         EControlSetOtgDescriptor,
   384         EControlSetOtgDescriptor,
   383         EControlGetOtgDescriptor,
   385         EControlGetOtgDescriptor,
   384         EControlGetOtgFeatures, 
   386         EControlGetOtgFeatures, 
   385         EControlRealizeInterface,
   387         EControlRealizeInterface,
   386         EControlStartNextInAlternateSetting    
   388         EControlStartNextInAlternateSetting,
       
   389         EControlGetChargerDetectorCaps
   387         };
   390         };
   388 
   391 
   389 
   392 
   390  // const static TUint KFieldIdPos     = 0;
   393  // const static TUint KFieldIdPos     = 0;
   391     const static TUint KFieldIdMask    = 0xFF;
   394     const static TUint KFieldIdMask    = 0xFF;
  1213     inline void OtgFeaturesNotify(TRequestStatus& aStatus, TUint8& aValue);
  1216     inline void OtgFeaturesNotify(TRequestStatus& aStatus, TUint8& aValue);
  1214 
  1217 
  1215     /** Cancel pending OTG feature request.
  1218     /** Cancel pending OTG feature request.
  1216     */
  1219     */
  1217     inline void OtgFeaturesNotifyCancel();
  1220     inline void OtgFeaturesNotifyCancel();
  1218 
  1221     
  1219     /**    This function retrieves the alternate setting that the WriteData function can
  1222     /** Register for notification on USB charger type' change. If any usb charger
  1220         write to.  After a host sets the alternate setting, writes to the IN endpoint
  1223         is detected, request completes and current charger type value is filled in aValue.
  1221         are not permitted by the LDD until this method has been called.
  1224 
  1222         This function is not asynchronous nor blocking, and should not be used to
  1225         @param aStatus Request status object
  1223         detect that an alternate setting has happened.
  1226         @param aValue On request completion, it contains current charger type value
       
  1227     */
       
  1228     inline void ChargingPortTypeNotify(TRequestStatus& aStatus, TUint& aValue);
       
  1229 
       
  1230     /** Cancel pending Charger Type request.
       
  1231     */
       
  1232     inline void ChargingPortTypeNotifyCancel();     
       
  1233     inline TInt ChargerDetectorCaps(TUsbcChargerDetectorProperties& aProperties);
       
  1234 	/**	This function retrieves the alternate setting that the WriteData function can
       
  1235 		write to.  After a host sets the alternate setting, writes to the IN endpoint
       
  1236 		are not permitted by the LDD until this method has been called.
       
  1237 		This function is not asynchronous nor blocking, and should not be used to
       
  1238 		detect that an alternate setting has happened.
  1224 
  1239 
  1225         If the BIL methods are being used (recommended), then this method should not be called directly. 
  1240         If the BIL methods are being used (recommended), then this method should not be called directly. 
  1226 
  1241 
  1227         @return The alternative setting number or KErrInUse if the current alternative
  1242         @return The alternative setting number or KErrInUse if the current alternative
  1228          setting is already in use, that is to say that the alternative setting has not changed.
  1243          setting is already in use, that is to say that the alternative setting has not changed.