1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\include\drivers\pbus.inl
18 // Class TPBusCallBack
19 inline void TPBusCallBack::NotifyPBusStateChange(TInt aState, TInt anError)
20 { if (iFunction) (*iFunction)(iPtr,EPBusStateChange,(TAny*)aState,(TAny*)anError); }
21 inline void TPBusCallBack::NotifyCustom(TInt aParam, TInt anError)
22 { if (iFunction) (*iFunction)(iPtr,EPBusCustomNotification,(TAny*)aParam,(TAny*)anError); }
23 inline void TPBusCallBack::Isr(TInt anId)
24 { if (iIntMask&(1<<anId)) (*iIsr)(iPtr,anId); }
25 inline TInt TPBusCallBack::PowerUp()
26 { return iSocket->PowerUp(); }
27 inline TInt TPBusCallBack::PBusState()
28 { return iSocket->State(); }
29 inline TDfcQue* TPBusCallBack::DfcQ()
30 { return iSocket->DfcQ(); }
31 inline void TPBusCallBack::Add()
32 { iSocket->Add(this); }
36 Checks whether the PSU is off.
38 The PSU is off when it is in the EPsuOff state.
42 @return ETrue PSU state is EPsuOff, EFalse otherwise
44 inline TBool DPBusPsuBase::IsOff()
45 {return(iState==EPsuOff);}
48 Limits the PSU current to a safe level.
50 inline void DPBusPsuBase::SetCurrLimited()
54 Resets inactivity and not-locked counts.
56 inline void DPBusPsuBase::ResetInactivityTimer()
57 {iInactivityCount=0; iNotLockedCount=0;}
60 Gets the voltage level, or range of supported voltage levels.
62 @return The voltage level, or range of voltages supported.
64 @see TPBusPsuInfo::iVoltageSupported
66 inline TUint DPBusPsuBase::VoltageSupported()
67 {return(iVoltageSupported);}
70 Gets the maximum current (in microAmps) that the PSU is able to supply.
72 @return Maximum current (in microAmps).
74 @see TPBusPsuInfo::iMaxCurrentInMicroAmps
76 inline TInt DPBusPsuBase::MaxCurrentInMicroAmps()
77 {return(iMaxCurrentInMicroAmps);}
83 Gets the current PBUS state.
84 @return Current PBus state.
87 inline TInt DPBusSocket::State()
90 This function returns the address of DPBusSocket::iDfcQ queue.
91 @return Address of DPBusSocket::iDfcQ
94 inline TDfcQue* DPBusSocket::DfcQ()
98 Gets media state as EDoorOpen if the media door is open, EDoorClosed if the media door is closed.
99 @return TMediaState enumeration describing the state of door (EDoorOpen, EDoorClosed)
102 inline TMediaState DPBusSocket::MediaState()
103 { return iMediaChange->MediaState(); }