baseport/syborg/specific/syborg.cia
author johnathan.white@2718R8BGH51.accenture.com
Mon, 08 Mar 2010 18:45:03 +0000
changeset 46 b6935a90ca64
parent 2 d55eb581a87c
child 76 8e8bf3dcfd6b
child 79 80387fbc46c5
permissions -rw-r--r--
Modify framebuffer and NGA framebuffer to read screen size from board model dtb file. Optimise memory usuage of frame buffer Add example minigui application with hooks to profiler (which writes results to S:\). Modified NGA framebuffer to run its own dfc queue at high priority

/*
* Copyright (c) 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:
*
*/

#include <syborg_priv.h>

//
//	Timer Access Functions
//

// Set the starting count value for a timer
EXPORT_C void __NAKED__ TSyborg::SetTimerLoad(TUint /*aTimerBase*/, TUint32 /*aValue*/)
{
  asm("str r1, [r0, #12]");
  asm("bx lr");
}

// Read the load register (starting count value)
EXPORT_C TUint __NAKED__ TSyborg::TimerLoad(TUint /*aTimerBase*/)
{
  asm("ldr r0, [r0, #12]");
  asm("bx lr");
}

// Read the actual timer value
EXPORT_C TUint __NAKED__ TSyborg::TimerValue(TUint /*aTimerBase*/)
{
	asm("ldr r0, [r0, #16]");
    asm("bx lr");
}

// Clear the timer interrupt by writing a value to Timer x clear register
// The written value doesn't matter as any value will clear the interrupt.
EXPORT_C void __NAKED__ TSyborg::ClearTimerInt(TUint /*aTimerBase*/)
{
	asm("mov r1, #1");	
	asm("str r1, [r0, #24]");
    asm("bx lr");
}

//
//Interrupt Controller Acces Functions
//

// Enable specified motherboard Int on either the PIC/SIC
EXPORT_C void __NAKED__ TSyborg::EnableInt(TUint /*anId*/)
{
  asm("ldr r1, __KHwInt");
  asm("str r0, [r1, #20]");
  asm("bx lr");
}

// Disable specified motherboard Int on either the PIC/SIC
EXPORT_C void __NAKED__ TSyborg::DisableInt(TUint /*anId*/)
{
  asm("ldr r1, __KHwInt");
  asm("str r0, [r1, #16]");
  asm("bx lr");
	
	asm("__KHwInt:");
	asm(".word %a0" : : "i" (TInt)(KHwBaseSic));
}