sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\drivers\usbc.inl sl@0: // Kernel side inline header file for USB device driver. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file usbc.inl sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __USBC_INL__ sl@0: #define __USBC_INL__ sl@0: sl@0: sl@0: // --- USB Logical Device Driver (LDD) --- sl@0: // sl@0: sl@0: TInt TDmaBuf::RxBytesAvailable() const sl@0: { sl@0: return iTotalRxBytesAvail; sl@0: } sl@0: sl@0: sl@0: TUsbcEndpointInfo* TUsbcEndpoint::EndpointInfo() sl@0: { sl@0: return &iEndpointInfo; sl@0: } sl@0: sl@0: sl@0: TInt TUsbcEndpoint::RxBytesAvailable() const sl@0: { sl@0: return iDmaBuffers->RxBytesAvailable(); sl@0: } sl@0: sl@0: TInt TUsbcEndpoint::BufferSize() const sl@0: { sl@0: return iDmaBuffers->BufferSize(); sl@0: } sl@0: TInt TUsbcEndpoint::SetBufferAddr( TInt aBufInd, TUint8* aBufAddr) sl@0: { sl@0: return iDmaBuffers->SetBufferAddr(aBufInd, aBufAddr); sl@0: } sl@0: TInt TUsbcEndpoint::BufferNumber() const sl@0: { sl@0: return iDmaBuffers->BufferNumber(); sl@0: } sl@0: sl@0: void TUsbcEndpoint::SetTransferInfo(TEndpointTransferInfo* aTransferInfo) sl@0: { sl@0: iTransferInfo = *aTransferInfo; sl@0: iBytesTransferred = 0; sl@0: } sl@0: sl@0: sl@0: void TUsbcEndpoint::ResetTransferInfo() sl@0: { sl@0: iTransferInfo.iDes = NULL; sl@0: iTransferInfo.iTransferType = ETransferTypeNone; sl@0: iTransferInfo.iTransferSize = 0; sl@0: iTransferInfo.iZlpReqd = EFalse; sl@0: iBytesTransferred = 0; sl@0: } sl@0: sl@0: sl@0: void TUsbcEndpoint::SetClientReadPending(TBool aVal) sl@0: { sl@0: iClientReadPending = aVal; sl@0: } sl@0: sl@0: sl@0: TBool TUsbcEndpoint::ClientReadPending() sl@0: { sl@0: return iClientReadPending; sl@0: } sl@0: sl@0: sl@0: void TUsbcEndpoint::SetClientWritePending(TBool aVal) sl@0: { sl@0: iClientWritePending = aVal; sl@0: } sl@0: sl@0: sl@0: TBool TUsbcEndpoint::ClientWritePending() sl@0: { sl@0: return iClientWritePending; sl@0: } sl@0: sl@0: sl@0: void TUsbcEndpoint::SetRealEpNumber(TInt aRealEpNumber) sl@0: { sl@0: iRealEpNumber = aRealEpNumber; sl@0: iRequestCallbackInfo->iRealEpNum = aRealEpNumber; sl@0: } sl@0: sl@0: sl@0: TInt TUsbcEndpoint::RealEpNumber() const sl@0: { sl@0: return iRealEpNumber; sl@0: } sl@0: sl@0: sl@0: #endif // __USBC_INL__