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_hai.inl sl@0: // DMA Framework - Symbian Hardware Abstraction Interface (SHAI). sl@0: // sl@0: // sl@0: sl@0: sl@0: // TDmac sl@0: sl@0: inline void TDmac::Wait() sl@0: { sl@0: NKern::FMWait(&iLock); sl@0: } sl@0: sl@0: inline void TDmac::Signal() sl@0: { sl@0: NKern::FMSignal(&iLock); sl@0: } sl@0: sl@0: inline TDmaTransferArgs& TDmac::HdrToDes(const SDmaDesHdr& aHdr) const sl@0: { sl@0: return static_cast(iDesPool)[&aHdr - iHdrPool]; sl@0: } sl@0: sl@0: inline TAny* TDmac::HdrToHwDes(const SDmaDesHdr& aHdr) const sl@0: { sl@0: return static_cast(iDesPool) + iDesSize * (&aHdr - iHdrPool); sl@0: } sl@0: sl@0: inline TUint32 TDmac::HwDesLinToPhys(TAny* aDes) const sl@0: { sl@0: #ifdef __WINS__ sl@0: (void)aDes; sl@0: return 0xDEADBEEF; sl@0: #else sl@0: return iHwDesChunk->iPhysAddr + sl@0: (reinterpret_cast(aDes) - iHwDesChunk->iLinAddr); sl@0: #endif sl@0: } sl@0: sl@0: sl@0: // ---