diff -r 000000000000 -r 6663340f3fc9 omap3530/assp/inc/omap3530_timer.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omap3530/assp/inc/omap3530_timer.inl Thu Oct 15 12:59:54 2009 +0100 @@ -0,0 +1,136 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// omap3530/assp/inc/omap3530_timer.inl +// + + +#ifndef __OMAP3530_TIMER_INL__ +# define _OMAP3530_TIMER_INL__ + +/** +@file + omap3530_timer.inl header file +This file provides timer handling for the omap3530 timers +@publishedAll +@released +*/ + +# include + +inline void CompileTimeChecks(void) ; + +namespace OMAP3530 + { + + namespace GPTimer + { + + template + inline TOmap3530_IRQ TGPTi::Irq() + { + return TOmap3530_IRQ(TTimerTraits::KIrq) ; + } + + template + inline void TGPTi::SelectClock() + { + typename TTimerTraits::TClockSelReg reg ; + reg.Modify(!TTimerTraits::KClockSelMask, + TTimerTraits::KClockSelValue) ; + } + + template + inline TBool TGPTi::CanWriteTCLR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TCLR::KOn)) ; + } + + template + inline TBool TGPTi::CanWriteTCRR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TCRR::KOn)) ; + } + + template + inline TBool TGPTi::CanWriteTLDR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TLDR::KOn)) ; + } + + template + inline TBool TGPTi::CanWriteTTGR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TTGR::KOn)) ; + } + + template + inline TBool TGPTi::CanWriteTMAR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TMAR::KOn)) ; + } + + template + inline void TGPTi::Reset() + { + iTIOCP_CFG.Write(TIOCP_CFG::T_SOFTRESET::KOn) ; + } + + template + inline TBool TGPTi::ResetComplete() + { + return (TISTAT::T_RESETDONE::KOn & iTISTAT.Read()) ; + } + + template + inline ::TBool TGPTi::WriteOutstanding() + { + return (iTWPS.Read()) ; + } + + + template + inline TBool TMsSyncTimer::CanWriteTPIR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TPIR::KOn)) ; + } + + template + inline TBool TMsSyncTimer::CanWriteTNIR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TNIR::KOn)) ; + } + + template + inline TBool TMsSyncTimer::CanWriteTCVR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TCVR::KOn)) ; + } + + template + inline TBool TMsSyncTimer::CanWriteTOCR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TOCR::KOn)) ; + } + + template + inline TBool TMsSyncTimer::CanWriteTOWR() + { + return (0 == (iTWPS.Read() & TWPS::T_W_PEND_TOWR::KOn)) ; + } + + } // namespace GPTimer + + } // namespace OMAP3530 + +#endif /* ndef __OMAP3530_TIMER_INL__ */