|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * naviengine_assp\assp.cia |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #include <e32cia.h> |
|
22 #include <naviengine_priv.h> |
|
23 #include <naviengine.h> |
|
24 #include "navienginecia.h" |
|
25 #include <upd35001_timer.h> |
|
26 |
|
27 |
|
28 __NAKED__ void MsTimerTick(TAny* aPtr) |
|
29 { |
|
30 // Service 1ms tick interrupt |
|
31 #ifdef TOGLE_UART_DTR_LINE |
|
32 asm("ldr r2, 3f"); |
|
33 asm("add r2,r2,#0x10"); // KHwRoGpio_Port_Value |
|
34 asm("ldr r2, [r2]"); |
|
35 asm("mov r3,#%a0" : : "i" ((TInt)(1<<9))); |
|
36 asm("ands r2,r2,r3"); |
|
37 asm("ldr r2, 3f"); |
|
38 asm("add r2,r2,#0xc"); //r2 has KHwWoGpio_Port_Set_Clear_Lo |
|
39 asm("movne r3,r3,lsl #16"); |
|
40 asm("str r3,[r2]"); |
|
41 #endif |
|
42 asm("ldr r1, 1f "); // Base address of timer 0 |
|
43 asm("mov r2, #%a0" : : "i" ((TInt)KNETimerGTIInt_TCI)); |
|
44 asm("str r2, [r1, #%a0]" : : "i" _FOFF(NETimer,iGTInterrupt)); // clear interrupt |
|
45 asm("ldr r2, 2f "); // set period again needed due to idle tick |
|
46 asm("str r2, [r1, #%a0]" : : "i" _FOFF(NETimer,iTimerReset)); // supression |
|
47 asm("b " CSM_ZN7NTimerQ4TickEv); // Tick the millisecond timer |
|
48 |
|
49 asm("1: "); |
|
50 asm(".word %a0" : : "i" ((TInt)KHwTimersBase)); |
|
51 asm("2: "); |
|
52 asm(".word %a0" : : "i" ((TInt)66666)); |
|
53 #ifdef TOGLE_UART_DTR_LINE |
|
54 asm("3: "); |
|
55 asm(".word %a0" : : "i" ((TInt)KHwGPIOBase)); |
|
56 #endif |
|
57 } |
|
58 |
|
59 |
|
60 __NAKED__ TUint64 DoRead64(TLinAddr /*aAddr*/) |
|
61 { |
|
62 asm("ldmia r0, {r0-r1} "); |
|
63 __JUMP(,lr); |
|
64 } |
|
65 |
|
66 |
|
67 __NAKED__ void DoWrite64(TLinAddr aAddr, TUint64 aValue) |
|
68 { |
|
69 #ifdef __EABI__ |
|
70 asm("stmia r0, {r2-r3} "); |
|
71 #else |
|
72 asm("stmia r0, {r1-r2} "); |
|
73 #endif |
|
74 __JUMP(,lr); |
|
75 } |
|
76 |
|
77 |