baseport/src/cedar/generic/base/syborg/monitor/monitor.cpp
changeset 0 ffa851df0825
equal deleted inserted replaced
-1:000000000000 0:ffa851df0825
       
     1 /*
       
     2 * Copyright (c) 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 the License "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 *
       
    16 */
       
    17 
       
    18 #include <monitor.h>
       
    19 #include <system_priv.h>
       
    20 
       
    21 #include "syborg_serial.h"
       
    22 
       
    23 void CrashDebugger::InitUart()
       
    24 {
       
    25   TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
       
    26   TUint8 res = ReadReg(debugPortBase, 0);
       
    27   WriteReg(debugPortBase,DCommSyborgSoc::SERIAL_INT_ENABLE,0);
       
    28 }
       
    29 
       
    30 void CrashDebugger::UartOut(TUint aChar)
       
    31 {
       
    32   TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
       
    33   WriteReg(debugPortBase,DCommSyborgSoc::SERIAL_DATA,aChar);
       
    34 }
       
    35 
       
    36 TUint8 CrashDebugger::UartIn()
       
    37 {
       
    38   TUint32 debugPortBase = VARIANT_INTERFACE::DebugPortAddr();
       
    39   while (ReadReg(debugPortBase,DCommSyborgSoc::SERIAL_FIFO_COUNT)==0)
       
    40 	;
       
    41 
       
    42   return ReadReg(debugPortBase,DCommSyborgSoc::SERIAL_DATA);
       
    43 }
       
    44 
       
    45 TBool CrashDebugger::CheckPower()
       
    46 {
       
    47 	return EFalse;
       
    48 }