sl@0: // Copyright (c) 2002-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 "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: // include/drivers/dma_compat.inl sl@0: // DMA Framework - Client API definition. sl@0: // sl@0: // Inline implementations of functions which (originally) exposed DMA HAI sl@0: // details that are now, after the header file split into dma_v2.h and sl@0: // dma_hai.h, no longer meant to be visible to DMA clients. This file is only sl@0: // included for DMA_APIV2 clients. sl@0: // sl@0: // This file is not meant to be a permanent one, and may eventually be removed sl@0: // together with the deprecated functions it implements. sl@0: // sl@0: // sl@0: sl@0: sl@0: inline const TDmac* TDmaChannel::Controller() const sl@0: { sl@0: return iController; sl@0: } sl@0: sl@0: static inline TUint32 RequestFlags2SrcConfigFlags(TUint aFlags) sl@0: { sl@0: TUint32 flags = (aFlags & KDmaMemSrc) ? KDmaMemAddr : 0; sl@0: flags |= (aFlags & KDmaPhysAddrSrc) ? KDmaPhysAddr : 0; sl@0: return flags; sl@0: } sl@0: sl@0: static inline TUint32 RequestFlags2DstConfigFlags(TUint aFlags) sl@0: { sl@0: TUint32 flags = (aFlags & KDmaMemDest) ? KDmaMemAddr : 0; sl@0: flags |= (aFlags & KDmaPhysAddrDest) ? KDmaPhysAddr : 0; sl@0: return flags; sl@0: } sl@0: sl@0: inline TInt TDmaChannel::MaxTransferSize(TUint aFlags, TUint32 aPslInfo) sl@0: { sl@0: TUint src_flags = RequestFlags2SrcConfigFlags(aFlags); sl@0: TUint dst_flags = RequestFlags2DstConfigFlags(aFlags); sl@0: return MaxTransferLength(src_flags, dst_flags, aPslInfo); sl@0: } sl@0: sl@0: inline TUint TDmaChannel::MemAlignMask(TUint aFlags, TUint32 aPslInfo) sl@0: { sl@0: TUint src_flags = RequestFlags2SrcConfigFlags(aFlags); sl@0: TUint dst_flags = RequestFlags2DstConfigFlags(aFlags); sl@0: return AddressAlignMask(src_flags, dst_flags, aPslInfo); sl@0: } sl@0: sl@0: sl@0: // ---