os/kernelhwsrv/kernel/eka/include/d32comm.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32\include\d32comm.inl
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
/**
sl@0
    19
 @file
sl@0
    20
 @publishedPartner
sl@0
    21
 @released
sl@0
    22
*/
sl@0
    23
sl@0
    24
#ifndef __KERNEL_MODE__
sl@0
    25
_LIT(KRBusDevComm,"Comm");
sl@0
    26
/**
sl@0
    27
@capability CommDD
sl@0
    28
*/
sl@0
    29
inline TInt RBusDevComm::Open(TInt aUnit)
sl@0
    30
	{return(DoCreate(KRBusDevComm,VersionRequired(),aUnit,NULL,NULL));}
sl@0
    31
inline TVersion RBusDevComm::VersionRequired() const
sl@0
    32
	{return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));}
sl@0
    33
inline void RBusDevComm::Read(TRequestStatus &aStatus,TDes8 &aDes)
sl@0
    34
	{TInt len=aDes.MaxLength();DoRequest(ERequestRead,aStatus,&aDes,&len);}
sl@0
    35
inline void RBusDevComm::Read(TRequestStatus &aStatus,TDes8 &aDes,TInt aLength)
sl@0
    36
	{DoRequest(ERequestRead,aStatus,&aDes,&aLength);}
sl@0
    37
inline void RBusDevComm::ReadOneOrMore(TRequestStatus &aStatus,TDes8 &aDes)
sl@0
    38
	{TInt len=(-aDes.MaxLength());DoRequest(ERequestRead,aStatus,&aDes,&len);}
sl@0
    39
inline void RBusDevComm::ReadCancel()
sl@0
    40
	{DoCancel(ERequestReadCancel);}
sl@0
    41
inline void RBusDevComm::Write(TRequestStatus &aStatus,const TDesC8 &aDes)
sl@0
    42
	{TInt len=aDes.Length();DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&len);}
sl@0
    43
inline void RBusDevComm::Write(TRequestStatus &aStatus,const TDesC8 &aDes,TInt aLength)
sl@0
    44
	{DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&aLength);}
sl@0
    45
inline void RBusDevComm::WriteCancel()
sl@0
    46
	{DoCancel(ERequestWriteCancel);}
sl@0
    47
inline void RBusDevComm::Break(TRequestStatus &aStatus,TInt aTime)
sl@0
    48
	{DoRequest(ERequestBreak,aStatus,&aTime);}
sl@0
    49
inline void RBusDevComm::BreakCancel()
sl@0
    50
	{DoCancel(ERequestBreakCancel);}
sl@0
    51
inline void RBusDevComm::Config(TDes8 &aConfig)
sl@0
    52
	{DoControl(EControlConfig,&aConfig);}
sl@0
    53
inline TInt RBusDevComm::SetConfig(const TDesC8 &aConfig)
sl@0
    54
	{return(DoControl(EControlSetConfig,(TAny *)&aConfig));}
sl@0
    55
inline void RBusDevComm::Caps(TDes8 &aCaps)
sl@0
    56
	{DoControl(EControlCaps,&aCaps);}
sl@0
    57
inline TUint RBusDevComm::Signals()
sl@0
    58
	{return(DoControl(EControlSignals));}
sl@0
    59
inline void RBusDevComm::SetSignals(TUint aSetMask,TUint aClearMask)
sl@0
    60
	{DoControl(EControlSetSignals,(TAny *)aSetMask,(TAny *)aClearMask);}
sl@0
    61
inline TInt RBusDevComm::QueryReceiveBuffer()
sl@0
    62
	{return(DoControl(EControlQueryReceiveBuffer));}
sl@0
    63
inline void RBusDevComm::ResetBuffers()
sl@0
    64
	{DoControl(EControlResetBuffers);}
sl@0
    65
inline TInt RBusDevComm::ReceiveBufferLength()
sl@0
    66
	{return(DoControl(EControlReceiveBufferLength));}
sl@0
    67
inline TInt RBusDevComm::SetReceiveBufferLength(TInt aLength)
sl@0
    68
	{return(DoControl(EControlSetReceiveBufferLength,(TAny *)aLength));}
sl@0
    69
inline void RBusDevComm::NotifySignalChange(TRequestStatus& aStatus, TUint& aSignals, TUint aSignalMask)
sl@0
    70
	{DoRequest(ERequestNotifySignalChange,aStatus,&aSignals,&aSignalMask);}
sl@0
    71
inline void RBusDevComm::NotifySignalChangeCancel()
sl@0
    72
	{DoCancel(ERequestNotifySignalChangeCancel);}
sl@0
    73
inline void RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus& aStatus)
sl@0
    74
	{DoRequest(ERequestRead,aStatus,NULL,NULL);}
sl@0
    75
inline void RBusDevComm::NotifyReceiveDataAvailableCancel()
sl@0
    76
	{DoCancel(ERequestReadCancel);}
sl@0
    77
inline TUint RBusDevComm::MinTurnaroundTime()
sl@0
    78
	{return(DoControl(EControlMinTurnaroundTime));}
sl@0
    79
inline TInt RBusDevComm::SetMinTurnaroundTime(TUint aMicroSeconds)
sl@0
    80
	{return(DoControl(EControlSetMinTurnaroundTime,(TAny *)aMicroSeconds));}
sl@0
    81
#ifdef _DEBUG_DEVCOMM
sl@0
    82
inline void RBusDevComm::DebugInfo(TDes8 &aInfo)
sl@0
    83
	{DoControl(EControlDebugInfo,&aInfo);}
sl@0
    84
#endif
sl@0
    85
//
sl@0
    86
_LIT(KRBusDevCommDCE,"CommDCE");
sl@0
    87
/**
sl@0
    88
@capability CommDD
sl@0
    89
*/
sl@0
    90
inline TInt RBusDevCommDCE::Open(TInt aUnit)
sl@0
    91
	{return(DoCreate(KRBusDevCommDCE,VersionRequired(),aUnit,NULL,NULL));}
sl@0
    92
inline TVersion RBusDevCommDCE::VersionRequired() const
sl@0
    93
	{return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));}
sl@0
    94
inline void RBusDevCommDCE::Read(TRequestStatus &aStatus,TDes8 &aDes)
sl@0
    95
	{TInt len=aDes.MaxLength();DoRequest(ERequestRead,aStatus,&aDes,&len);}
sl@0
    96
inline void RBusDevCommDCE::Read(TRequestStatus &aStatus,TDes8 &aDes,TInt aLength)
sl@0
    97
	{DoRequest(ERequestRead,aStatus,&aDes,&aLength);}
sl@0
    98
inline void RBusDevCommDCE::ReadOneOrMore(TRequestStatus &aStatus,TDes8 &aDes)
sl@0
    99
	{TInt len=(-aDes.MaxLength());DoRequest(ERequestRead,aStatus,&aDes,&len);}
sl@0
   100
inline void RBusDevCommDCE::ReadCancel()
sl@0
   101
	{DoCancel(ERequestReadCancel);}
sl@0
   102
inline void RBusDevCommDCE::Write(TRequestStatus &aStatus,const TDesC8 &aDes)
sl@0
   103
	{TInt len=aDes.Length();DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&len);}
sl@0
   104
inline void RBusDevCommDCE::Write(TRequestStatus &aStatus,const TDesC8 &aDes,TInt aLength)
sl@0
   105
	{DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&aLength);}
sl@0
   106
inline void RBusDevCommDCE::WriteCancel()
sl@0
   107
	{DoCancel(ERequestWriteCancel);}
sl@0
   108
inline void RBusDevCommDCE::Break(TRequestStatus &aStatus,TInt aTime)
sl@0
   109
	{DoRequest(ERequestBreak,aStatus,&aTime);}
sl@0
   110
inline void RBusDevCommDCE::BreakCancel()
sl@0
   111
	{DoCancel(ERequestBreakCancel);}
sl@0
   112
inline void RBusDevCommDCE::Config(TDes8 &aConfig)
sl@0
   113
	{DoControl(EControlConfig,&aConfig);}
sl@0
   114
inline TInt RBusDevCommDCE::SetConfig(const TDesC8 &aConfig)
sl@0
   115
	{return(DoControl(EControlSetConfig,(TAny *)&aConfig));}
sl@0
   116
inline void RBusDevCommDCE::Caps(TDes8 &aCaps)
sl@0
   117
	{DoControl(EControlCaps,&aCaps);}
sl@0
   118
inline TUint RBusDevCommDCE::Signals()
sl@0
   119
	{return(DoControl(EControlSignals));}
sl@0
   120
inline void RBusDevCommDCE::SetSignals(TUint aSetMask,TUint aClearMask)
sl@0
   121
	{DoControl(EControlSetSignals,(TAny *)aSetMask,(TAny *)aClearMask);}
sl@0
   122
inline TInt RBusDevCommDCE::QueryReceiveBuffer()
sl@0
   123
	{return(DoControl(EControlQueryReceiveBuffer));}
sl@0
   124
inline void RBusDevCommDCE::ResetBuffers()
sl@0
   125
	{DoControl(EControlResetBuffers);}
sl@0
   126
inline TInt RBusDevCommDCE::ReceiveBufferLength()
sl@0
   127
	{return(DoControl(EControlReceiveBufferLength));}
sl@0
   128
inline TInt RBusDevCommDCE::SetReceiveBufferLength(TInt aLength)
sl@0
   129
	{return(DoControl(EControlSetReceiveBufferLength,(TAny *)aLength));}
sl@0
   130
inline void RBusDevCommDCE::NotifySignalChange(TRequestStatus& aStatus,TUint& aSignals,TUint aSignalMask)
sl@0
   131
	{DoRequest(ERequestNotifySignalChange,aStatus,&aSignals,&aSignalMask);}
sl@0
   132
inline void RBusDevCommDCE::NotifySignalChangeCancel()
sl@0
   133
	{DoCancel(ERequestNotifySignalChangeCancel);}
sl@0
   134
inline void RBusDevCommDCE::NotifyReceiveDataAvailable(TRequestStatus& aStatus)
sl@0
   135
	{DoRequest(ERequestRead,aStatus,NULL,NULL);}
sl@0
   136
inline void RBusDevCommDCE::NotifyReceiveDataAvailableCancel()
sl@0
   137
	{DoCancel(ERequestReadCancel);}
sl@0
   138
inline void RBusDevCommDCE::NotifyFlowControlChange(TRequestStatus& aStatus)
sl@0
   139
	{DoRequest(ERequestNotifyFlowControlChange,aStatus);}
sl@0
   140
inline void RBusDevCommDCE::NotifyFlowControlChangeCancel()
sl@0
   141
	{DoCancel(ERequestNotifyFlowControlChangeCancel);}
sl@0
   142
inline void RBusDevCommDCE::GetFlowControlStatus(TFlowControl& aFlowControl)
sl@0
   143
	{DoControl(EControlFlowControlStatus,(TAny*)&aFlowControl);}
sl@0
   144
inline void RBusDevCommDCE::NotifyConfigChange(TRequestStatus& aStatus, TDes8& aNewConfig)
sl@0
   145
	{DoRequest(ERequestNotifyConfigChange,aStatus,(TAny*)&aNewConfig);}
sl@0
   146
inline void RBusDevCommDCE::NotifyConfigChangeCancel()
sl@0
   147
	{DoCancel(ERequestNotifyConfigChangeCancel);}
sl@0
   148
#ifdef _DEBUG_DEVCOMM
sl@0
   149
inline void RBusDevCommDCE::DebugInfo(TDes8 &aInfo)
sl@0
   150
	{DoControl(EControlDebugInfo,&aInfo);}
sl@0
   151
#endif
sl@0
   152
#endif