equal
deleted
inserted
replaced
348 TSglQueLink iLink; |
348 TSglQueLink iLink; |
349 private: |
349 private: |
350 DBase* iOwner; |
350 DBase* iOwner; |
351 TDfc iDfc; |
351 TDfc iDfc; |
352 TUint8 iValue; |
352 TUint8 iValue; |
|
353 }; |
|
354 /** USB Charger Type change callback. |
|
355 */ |
|
356 class TUsbcChargerTypeCallback |
|
357 { |
|
358 public: |
|
359 inline TUsbcChargerTypeCallback (DBase* aOwner, TDfcFn aCallback, TInt aPriority); |
|
360 inline void SetChargerType(TUint aType); |
|
361 inline TUint ChargerType () const; |
|
362 inline void SetPendingNotify(TBool aPendingNotify); |
|
363 inline TBool PendingNotify () const; |
|
364 inline DBase* Owner() const; |
|
365 inline TInt DoCallback(); |
|
366 inline void Cancel(); |
|
367 inline void SetDfcQ(TDfcQue* aDfcQ); |
|
368 public: |
|
369 /** Used by the PIL to queue callback objects into a TSglQue. */ |
|
370 TSglQueLink iLink; |
|
371 private: |
|
372 DBase* iOwner; |
|
373 TDfc iDfc; |
|
374 TUint iChargerType; |
|
375 TBool iPendingNotify; |
353 }; |
376 }; |
354 |
377 |
355 // |
378 // |
356 //########################### Physical Device Driver (PIL + PSL) ###################### |
379 //########################### Physical Device Driver (PIL + PSL) ###################### |
357 // |
380 // |
684 IMPORT_C TInt SetStringDescriptor(DThread* aThread, TUint8 aIndex, const TDes8& aString); |
707 IMPORT_C TInt SetStringDescriptor(DThread* aThread, TUint8 aIndex, const TDes8& aString); |
685 IMPORT_C TInt RemoveStringDescriptor(TUint8 aIndex); |
708 IMPORT_C TInt RemoveStringDescriptor(TUint8 aIndex); |
686 IMPORT_C TBool QueryEndpointResource(const DBase* aClientId, TInt aEndpointNum, |
709 IMPORT_C TBool QueryEndpointResource(const DBase* aClientId, TInt aEndpointNum, |
687 TUsbcEndpointResource aResource); |
710 TUsbcEndpointResource aResource); |
688 IMPORT_C TInt EndpointPacketSize(const DBase* aClientId, TInt aEndpointNum); |
711 IMPORT_C TInt EndpointPacketSize(const DBase* aClientId, TInt aEndpointNum); |
|
712 IMPORT_C TInt RegisterChargingPortTypeNotify(TUsbcChargerTypeCallback& aCallback); |
|
713 IMPORT_C TInt DeRegisterChargingPortTypeNotify(const DBase* aClientId); |
|
714 IMPORT_C void ChargerDetectorCaps(UsbShai::TChargerDetectorProperties& aProperties); |
689 |
715 |
690 // Called by LDD |
716 // Called by LDD |
691 IMPORT_C TDfcQue* DfcQ(TInt aIndex); |
717 IMPORT_C TDfcQue* DfcQ(TInt aIndex); |
692 IMPORT_C void DumpRegisters(); |
718 IMPORT_C void DumpRegisters(); |
693 IMPORT_C TInt SignalRemoteWakeup(); |
719 IMPORT_C TInt SignalRemoteWakeup(); |
871 inline void ResetEp0DataOutVars(); |
897 inline void ResetEp0DataOutVars(); |
872 inline TBool IsInTheStatusList(const TUsbcStatusCallback& aCallback); |
898 inline TBool IsInTheStatusList(const TUsbcStatusCallback& aCallback); |
873 inline TBool IsInTheEpStatusList(const TUsbcEndpointStatusCallback& aCallback); |
899 inline TBool IsInTheEpStatusList(const TUsbcEndpointStatusCallback& aCallback); |
874 inline TBool IsInTheOtgFeatureList(const TUsbcOtgFeatureCallback& aCallback); |
900 inline TBool IsInTheOtgFeatureList(const TUsbcOtgFeatureCallback& aCallback); |
875 inline TBool IsInTheRequestList(const TUsbcRequestCallback& aCallback); |
901 inline TBool IsInTheRequestList(const TUsbcRequestCallback& aCallback); |
|
902 inline TBool IsInTheChargerTypeList(const TUsbcChargerTypeCallback& aCallback); |
876 static void ReconnectTimerCallback(TAny* aPtr); |
903 static void ReconnectTimerCallback(TAny* aPtr); |
877 static void CableStatusTimerCallback(TAny* aPtr); |
904 static void CableStatusTimerCallback(TAny* aPtr); |
878 static void PowerUpDfc(TAny* aPtr); |
905 static void PowerUpDfc(TAny* aPtr); |
879 static void PowerDownDfc(TAny* aPtr); |
906 static void PowerDownDfc(TAny* aPtr); |
880 static void DeviceEventNotifyDfc(TAny* aPtr); |
907 static void DeviceEventNotifyDfc(TAny* aPtr); |
932 DUsbcPowerHandler* iPowerHandler; // pointer to USB power handler object |
959 DUsbcPowerHandler* iPowerHandler; // pointer to USB power handler object |
933 TSpinLock iUsbLock; // implement SMP for USB PDD and LDD |
960 TSpinLock iUsbLock; // implement SMP for USB PDD and LDD |
934 NFastMutex iMutex; // To pretect interface set with NFastMutex |
961 NFastMutex iMutex; // To pretect interface set with NFastMutex |
935 UsbShai::MPeripheralControllerIf& iController; // PSL code |
962 UsbShai::MPeripheralControllerIf& iController; // PSL code |
936 |
963 |
937 const UsbShai::TPeripheralControllerProperties& iControllerProperties; // Static configuration from PSL |
964 const UsbShai::TPeripheralControllerProperties iControllerProperties; // Static configuration from PSL |
938 TBool iIsOtgPort; // Is this instance a driver for otg port, |
965 TBool iIsOtgPort; // Is this instance a driver for otg port, |
939 // Set at construction time. |
966 // Set at construction time. |
940 |
967 |
941 /** |
968 /** |
942 * Pointer to the currently set OTG Observer, if any. Not owned. |
969 * Pointer to the currently set OTG Observer, if any. Not owned. |
972 // so that the PIL layer can call it to enable and disable the D+ |
999 // so that the PIL layer can call it to enable and disable the D+ |
973 // pull-up. This mechanism is no longer used |
1000 // pull-up. This mechanism is no longer used |
974 TInt (*iEnablePullUpOnDPlus)(TAny* aOtgContext); |
1001 TInt (*iEnablePullUpOnDPlus)(TAny* aOtgContext); |
975 TInt (*iDisablePullUpOnDPlus)(TAny* aOtgContext); |
1002 TInt (*iDisablePullUpOnDPlus)(TAny* aOtgContext); |
976 TAny* iOtgContext; |
1003 TAny* iOtgContext; |
|
1004 private: |
|
1005 TSglQue<TUsbcChargerTypeCallback> iChargerTypeCallbacks; // list of USB charger type notification requests |
|
1006 TUint iCurrentChargerType; |
977 }; |
1007 }; |
978 |
1008 |
979 /** Simple queue of status changes to be recorded. |
1009 /** Simple queue of status changes to be recorded. |
980 Items are fetched by userside when able. |
1010 Items are fetched by userside when able. |
981 */ |
1011 */ |