os/kernelhwsrv/bsptemplate/asspandvariant/template_assp/template_assp.cia
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // template\template_assp\template_assp.cia
    15 // Template ASSP architecture layer
    16 // 
    17 //
    18 
    19 #include <e32cia.h>
    20 #include <template_assp_priv.h>
    21 
    22 __NAKED__ TUint64 DoRead64(TLinAddr /*aAddr*/)
    23 	{	
    24 	asm("ldmia	r0, {r0-r1} ");
    25 	__JUMP(,lr);	
    26 	}
    27 	
    28 
    29 __NAKED__ void DoWrite64(TLinAddr aAddr, TUint64 aValue)
    30 	{
    31 #ifdef __EABI__
    32 	asm("stmia	r0, {r2-r3} ");
    33 #else
    34 	asm("stmia	r0, {r1-r2} ");
    35 #endif
    36 	__JUMP(,lr);	            
    37 	}
    38 		
    39 EXPORT_C __NAKED__ void TTemplate::BootWaitMilliSeconds(TInt aDuration)
    40 //
    41 // Active waiting loop (not to be used after System Tick timer has been set up - Init3()
    42 //
    43 	{
    44 	//
    45 	// TO DO: (optional)
    46 	//
    47 	// Program a Hardware Timer to generate the required duration, and then loop until the timer expires.
    48 	// Do NOT use interrupts!
    49 	//
    50 	}
    51 
    52 
    53 __NAKED__ void TTemplate::NanoWait(TUint32 aInterval)
    54 //
    55 // Wait for aInterval nanoseconds
    56 //
    57 	{
    58 	// TO DO: work out the correct values for the hardware
    59 	
    60 	asm("sub r0, r0, #100");
    61 	asm("1:");
    62 	asm("subs r0, r0, #20");
    63 	asm("bgt 1b");	
    64 	__JUMP(,lr);
    65 	}