epoc32/include/drivers/pbus.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32\include\drivers\pbus.inl
    15 // 
    16 //
    17 
    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); }
    33 
    34 // Class DPBusPsuBase
    35 /**
    36 Checks whether the PSU is off.
    37 
    38 The PSU is off when it is in the EPsuOff state.
    39 
    40 @see EPsuOff
    41 
    42 @return ETrue PSU state is EPsuOff, EFalse otherwise
    43 */
    44 inline TBool DPBusPsuBase::IsOff() 
    45 	{return(iState==EPsuOff);}
    46 	
    47 /**
    48 Limits the PSU current to a safe level.
    49 */
    50 inline void DPBusPsuBase::SetCurrLimited()
    51 	{iCurrLimited=ETrue;}
    52 	
    53 /**
    54 Resets inactivity and not-locked counts.
    55 */
    56 inline void DPBusPsuBase::ResetInactivityTimer()
    57 	{iInactivityCount=0; iNotLockedCount=0;}
    58 	
    59 /**
    60 Gets the voltage level, or range of supported voltage levels.
    61 
    62 @return The voltage level, or range of voltages supported.
    63 
    64 @see TPBusPsuInfo::iVoltageSupported
    65 */	
    66 inline TUint DPBusPsuBase::VoltageSupported()
    67 	{return(iVoltageSupported);}
    68 	
    69 /**
    70 Gets the maximum current (in microAmps) that the PSU is able to supply.
    71 
    72 @return Maximum current (in microAmps).
    73 
    74 @see TPBusPsuInfo::iMaxCurrentInMicroAmps
    75 */	
    76 inline TInt DPBusPsuBase::MaxCurrentInMicroAmps()
    77 	{return(iMaxCurrentInMicroAmps);}
    78 
    79 
    80 // class DPBusSocket
    81 
    82 /**
    83   Gets the current PBUS state. 
    84   @return Current PBus state.
    85   @see TPBusState
    86   */
    87 inline TInt DPBusSocket::State()
    88 	{ return iState; }
    89 /**
    90   This function returns the address of DPBusSocket::iDfcQ queue. 
    91   @return Address of DPBusSocket::iDfcQ
    92   @see TDfcQue
    93   */
    94 inline TDfcQue* DPBusSocket::DfcQ()
    95 	{ return &iDfcQ; }
    96 
    97 /**
    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)
   100   @see TMediaState
   101   */
   102 inline TMediaState DPBusSocket::MediaState()
   103 	{ return iMediaChange->MediaState(); }