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
williamr@2
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// e32\include\drivers\pbus.inl
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
// Class TPBusCallBack
williamr@2
    19
inline void TPBusCallBack::NotifyPBusStateChange(TInt aState, TInt anError)
williamr@2
    20
	{ if (iFunction) (*iFunction)(iPtr,EPBusStateChange,(TAny*)aState,(TAny*)anError); }
williamr@2
    21
inline void TPBusCallBack::NotifyCustom(TInt aParam, TInt anError)
williamr@2
    22
	{ if (iFunction) (*iFunction)(iPtr,EPBusCustomNotification,(TAny*)aParam,(TAny*)anError); }
williamr@2
    23
inline void TPBusCallBack::Isr(TInt anId)
williamr@2
    24
	{ if (iIntMask&(1<<anId)) (*iIsr)(iPtr,anId); }
williamr@2
    25
inline TInt TPBusCallBack::PowerUp()
williamr@2
    26
	{ return iSocket->PowerUp(); }
williamr@2
    27
inline TInt TPBusCallBack::PBusState()
williamr@2
    28
	{ return iSocket->State(); }
williamr@2
    29
inline TDfcQue* TPBusCallBack::DfcQ()
williamr@2
    30
	{ return iSocket->DfcQ(); }
williamr@2
    31
inline void TPBusCallBack::Add()
williamr@2
    32
	{ iSocket->Add(this); }
williamr@2
    33
williamr@2
    34
// Class DPBusPsuBase
williamr@2
    35
/**
williamr@2
    36
Checks whether the PSU is off.
williamr@2
    37
williamr@2
    38
The PSU is off when it is in the EPsuOff state.
williamr@2
    39
williamr@2
    40
@see EPsuOff
williamr@2
    41
williamr@2
    42
@return ETrue PSU state is EPsuOff, EFalse otherwise
williamr@2
    43
*/
williamr@2
    44
inline TBool DPBusPsuBase::IsOff() 
williamr@2
    45
	{return(iState==EPsuOff);}
williamr@2
    46
	
williamr@2
    47
/**
williamr@2
    48
Limits the PSU current to a safe level.
williamr@2
    49
*/
williamr@2
    50
inline void DPBusPsuBase::SetCurrLimited()
williamr@2
    51
	{iCurrLimited=ETrue;}
williamr@2
    52
	
williamr@2
    53
/**
williamr@2
    54
Resets inactivity and not-locked counts.
williamr@2
    55
*/
williamr@2
    56
inline void DPBusPsuBase::ResetInactivityTimer()
williamr@2
    57
	{iInactivityCount=0; iNotLockedCount=0;}
williamr@2
    58
	
williamr@2
    59
/**
williamr@2
    60
Gets the voltage level, or range of supported voltage levels.
williamr@2
    61
williamr@2
    62
@return The voltage level, or range of voltages supported.
williamr@2
    63
williamr@2
    64
@see TPBusPsuInfo::iVoltageSupported
williamr@2
    65
*/	
williamr@2
    66
inline TUint DPBusPsuBase::VoltageSupported()
williamr@2
    67
	{return(iVoltageSupported);}
williamr@2
    68
	
williamr@2
    69
/**
williamr@2
    70
Gets the maximum current (in microAmps) that the PSU is able to supply.
williamr@2
    71
williamr@2
    72
@return Maximum current (in microAmps).
williamr@2
    73
williamr@2
    74
@see TPBusPsuInfo::iMaxCurrentInMicroAmps
williamr@2
    75
*/	
williamr@2
    76
inline TInt DPBusPsuBase::MaxCurrentInMicroAmps()
williamr@2
    77
	{return(iMaxCurrentInMicroAmps);}
williamr@2
    78
williamr@2
    79
williamr@2
    80
// class DPBusSocket
williamr@2
    81
williamr@2
    82
/**
williamr@2
    83
  Gets the current PBUS state. 
williamr@2
    84
  @return Current PBus state.
williamr@2
    85
  @see TPBusState
williamr@2
    86
  */
williamr@2
    87
inline TInt DPBusSocket::State()
williamr@2
    88
	{ return iState; }
williamr@2
    89
/**
williamr@2
    90
  This function returns the address of DPBusSocket::iDfcQ queue. 
williamr@2
    91
  @return Address of DPBusSocket::iDfcQ
williamr@2
    92
  @see TDfcQue
williamr@2
    93
  */
williamr@2
    94
inline TDfcQue* DPBusSocket::DfcQ()
williamr@2
    95
	{ return &iDfcQ; }
williamr@2
    96
williamr@2
    97
/**
williamr@2
    98
  Gets media state as EDoorOpen if the media door is open, EDoorClosed if the media door is closed.
williamr@2
    99
  @return TMediaState enumeration describing the state of door (EDoorOpen, EDoorClosed)
williamr@2
   100
  @see TMediaState
williamr@2
   101
  */
williamr@2
   102
inline TMediaState DPBusSocket::MediaState()
williamr@2
   103
	{ return iMediaChange->MediaState(); }