os/kernelhwsrv/bsptemplate/asspandvariant/template_assp/template_assp.cia
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/bsptemplate/asspandvariant/template_assp/template_assp.cia	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,65 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// template\template_assp\template_assp.cia
    1.18 +// Template ASSP architecture layer
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#include <e32cia.h>
    1.23 +#include <template_assp_priv.h>
    1.24 +
    1.25 +__NAKED__ TUint64 DoRead64(TLinAddr /*aAddr*/)
    1.26 +	{	
    1.27 +	asm("ldmia	r0, {r0-r1} ");
    1.28 +	__JUMP(,lr);	
    1.29 +	}
    1.30 +	
    1.31 +
    1.32 +__NAKED__ void DoWrite64(TLinAddr aAddr, TUint64 aValue)
    1.33 +	{
    1.34 +#ifdef __EABI__
    1.35 +	asm("stmia	r0, {r2-r3} ");
    1.36 +#else
    1.37 +	asm("stmia	r0, {r1-r2} ");
    1.38 +#endif
    1.39 +	__JUMP(,lr);	            
    1.40 +	}
    1.41 +		
    1.42 +EXPORT_C __NAKED__ void TTemplate::BootWaitMilliSeconds(TInt aDuration)
    1.43 +//
    1.44 +// Active waiting loop (not to be used after System Tick timer has been set up - Init3()
    1.45 +//
    1.46 +	{
    1.47 +	//
    1.48 +	// TO DO: (optional)
    1.49 +	//
    1.50 +	// Program a Hardware Timer to generate the required duration, and then loop until the timer expires.
    1.51 +	// Do NOT use interrupts!
    1.52 +	//
    1.53 +	}
    1.54 +
    1.55 +
    1.56 +__NAKED__ void TTemplate::NanoWait(TUint32 aInterval)
    1.57 +//
    1.58 +// Wait for aInterval nanoseconds
    1.59 +//
    1.60 +	{
    1.61 +	// TO DO: work out the correct values for the hardware
    1.62 +	
    1.63 +	asm("sub r0, r0, #100");
    1.64 +	asm("1:");
    1.65 +	asm("subs r0, r0, #20");
    1.66 +	asm("bgt 1b");	
    1.67 +	__JUMP(,lr);
    1.68 +	}