sl@0: // Copyright (c) 2008-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\usbcsc.inl sl@0: // Kernel side inline header file for USB device driver. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file usbcsc.inl sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __USBCSC_INL__ sl@0: #define __USBCSC_INL__ sl@0: sl@0: sl@0: // sl@0: // --- USB Logical Device Driver (LDD) --- sl@0: // sl@0: sl@0: TUsbcScEndpointInfo* TUsbcScEndpoint::EndpointInfo() sl@0: { sl@0: return &iEndpointInfo; sl@0: } sl@0: sl@0: sl@0: void TUsbcScEndpoint::SetClientReadPending(TBool aVal) sl@0: { sl@0: iClientReadPending = aVal; sl@0: } sl@0: sl@0: sl@0: TBool TUsbcScEndpoint::ClientReadPending() sl@0: { sl@0: return iClientReadPending; sl@0: } sl@0: sl@0: sl@0: void TUsbcScEndpoint::SetClientWritePending(TBool aVal) sl@0: { sl@0: iClientWritePending = aVal; sl@0: } sl@0: sl@0: sl@0: TBool TUsbcScEndpoint::ClientWritePending() sl@0: { sl@0: return iClientWritePending; sl@0: } sl@0: sl@0: sl@0: void TUsbcScEndpoint::SetRealEpNumber(TInt aRealEpNumber) sl@0: { sl@0: iRealEpNumber = aRealEpNumber; sl@0: iRequestCallbackInfo->iRealEpNum = aRealEpNumber; sl@0: } sl@0: sl@0: sl@0: TInt TUsbcScEndpoint::RealEpNumber() const sl@0: { sl@0: return iRealEpNumber; sl@0: } sl@0: TInt TUsbcScEndpoint::EpNumber() const sl@0: { sl@0: return iEndpointNumber; sl@0: } sl@0: void TUsbcScEndpoint::StartBuffer() sl@0: { sl@0: iBuffer->StartEndpoint(iRequestCallbackInfo, iEndpointInfo.iFlags); sl@0: } sl@0: sl@0: void TUsbcScEndpoint::SetBuffer(TUsbcScBuffer* aBuffer) sl@0: { sl@0: __ASSERT_ALWAYS(iBuffer==NULL, Kern::Fault("TUsbcScEndpoint::SetBuffer", __LINE__)); sl@0: iBuffer = aBuffer; sl@0: } sl@0: sl@0: TUsbcScBuffer* TUsbcScEndpoint::GetBuffer() sl@0: { sl@0: __ASSERT_DEBUG(iBuffer!=NULL, Kern::Fault("TUsbcScEndpoint::GetBuffer", __LINE__)); sl@0: return iBuffer; sl@0: } sl@0: sl@0: inline TBool DLddUsbcScChannel::ValidEndpoint(TInt aEndpoint) sl@0: { sl@0: return (aEndpoint <= iNumberOfEndpoints && aEndpoint >= 0); sl@0: } sl@0: sl@0: inline TBool DLddUsbcScChannel::Configured() sl@0: { sl@0: if (iValidInterface && sl@0: (iDeviceState == EUsbcDeviceStateConfigured || iDeviceState == EUsbcDeviceStateSuspended)) sl@0: return ETrue; sl@0: return EFalse; sl@0: } sl@0: sl@0: #endif // __USBCSC_INL__