sl@0: // Copyright (c) 1998-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 the License "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: // template\template_assp\template_assp.cia sl@0: // Template ASSP architecture layer sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: sl@0: __NAKED__ TUint64 DoRead64(TLinAddr /*aAddr*/) sl@0: { sl@0: asm("ldmia r0, {r0-r1} "); sl@0: __JUMP(,lr); sl@0: } sl@0: sl@0: sl@0: __NAKED__ void DoWrite64(TLinAddr aAddr, TUint64 aValue) sl@0: { sl@0: #ifdef __EABI__ sl@0: asm("stmia r0, {r2-r3} "); sl@0: #else sl@0: asm("stmia r0, {r1-r2} "); sl@0: #endif sl@0: __JUMP(,lr); sl@0: } sl@0: sl@0: EXPORT_C __NAKED__ void TTemplate::BootWaitMilliSeconds(TInt aDuration) sl@0: // sl@0: // Active waiting loop (not to be used after System Tick timer has been set up - Init3() sl@0: // sl@0: { sl@0: // sl@0: // TO DO: (optional) sl@0: // sl@0: // Program a Hardware Timer to generate the required duration, and then loop until the timer expires. sl@0: // Do NOT use interrupts! sl@0: // sl@0: } sl@0: sl@0: sl@0: __NAKED__ void TTemplate::NanoWait(TUint32 aInterval) sl@0: // sl@0: // Wait for aInterval nanoseconds sl@0: // sl@0: { sl@0: // TO DO: work out the correct values for the hardware sl@0: sl@0: asm("sub r0, r0, #100"); sl@0: asm("1:"); sl@0: asm("subs r0, r0, #20"); sl@0: asm("bgt 1b"); sl@0: __JUMP(,lr); sl@0: }