baseport/syborg/monitor/monitor.cpp
author Gareth Stockwell <gareth.stockwell@accenture.com>
Fri, 24 Sep 2010 13:44:00 +0100
branchgraphics-phase-3
changeset 117 b7d35cad610d
parent 2 d55eb581a87c
permissions -rw-r--r--
Modified path to qemu package source to /sf/adapt/qemu This is to conform with the convention that adaptation-level packages should be located in /sf/adapt rather than /sf/adaptation. This is an interim workaround for bug 3744.

/*
* 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 <monitor.h>
#include <system_priv.h>

#include "syborg_serial.h"

void CrashDebugger::InitUart()
{
  TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
  TUint8 res = ReadReg(debugPortBase, 0);
  WriteReg(debugPortBase,DCommSyborgSoc::SERIAL_INT_ENABLE,0);
}

void CrashDebugger::UartOut(TUint aChar)
{
  TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
  WriteReg(debugPortBase,DCommSyborgSoc::SERIAL_DATA,aChar);
}

TUint8 CrashDebugger::UartIn()
{
  TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
  while (ReadReg(debugPortBase,DCommSyborgSoc::SERIAL_FIFO_COUNT)==0)
	;

  return ReadReg(debugPortBase,DCommSyborgSoc::SERIAL_DATA);
}

TBool CrashDebugger::CheckPower()
{
	return EFalse;
}