Catchup to latest Symbian^4 GCC_SURGE
authorWilliam Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:29:40 +0100
branchGCC_SURGE
changeset 45 e5bc2850013c
parent 40 d4c81235847e (current diff)
parent 44 4508ea692a4d (diff)
child 47 deed9c658f70
child 49 1aca0a33c223
Catchup to latest Symbian^4
--- a/omap3530/beagle_drivers/lcd/bld.inf	Thu Jul 08 11:51:55 2010 +0100
+++ b/omap3530/beagle_drivers/lcd/bld.inf	Thu Jul 22 16:29:40 2010 +0100
@@ -18,3 +18,4 @@
 
 PRJ_MMPFILES
 lcd
+lcd_gce
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/lcd/lcd_gce.mmp	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,58 @@
+// Copyright (c) 2004-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:
+// beagle/beagle_drivers/lcd.mmp
+// lcd.dll Beagle LCD driver
+//
+
+
+
+/**
+ @file
+*/
+#define __USING_ASSP_REGISTER_API__
+#define __USING_ASSP_INTERRUPT_API__
+
+#include			"beagle/variant.mmh"
+#include			"kernel/kern_ext.mmh"
+
+//Need to define NGA_BUILD for a NGA compliant Display PDD
+#define NGA_BUILD
+#ifdef NGA_BUILD
+MACRO ENABLE_GCE_MODE
+target				VariantTarget(lcd_gce,dll)
+#else
+target				VariantTarget(lcd,dll)
+#endif
+
+targettype			kext
+romtarget			lcd.dll
+
+sourcepath			.
+source				lcd.cpp
+
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+userinclude			.
+
+library			VariantTarget(ecust,lib)
+LIBRARY         AsspTarget(prcm,lib)
+
+noexportlibrary
+
+epocallowdlldata
+
+uid					0x1000008d 0x100039e8
+
+VENDORID 0x70000001
+
+capability			all
--- a/omap3530/beagleboard/rom/base_beagle.iby	Thu Jul 08 11:51:55 2010 +0100
+++ b/omap3530/beagleboard/rom/base_beagle.iby	Thu Jul 22 16:29:40 2010 +0100
@@ -86,7 +86,10 @@
 
 primary[VARID]	=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_ekern.exe			\sys\bin\ekern.exe
 extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_kaomap3530.dll		\sys\bin\kaomap3530.dll
+
 #include <..\omapshared\mstick.iby>
+
+// Removing BTRACEX
 //extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_BTRACEX.LDD			\sys\bin\btracex.ldd
 
 extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_prcm.dll				\sys\bin\prcm.dll
@@ -105,19 +108,27 @@
 extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_i2c.dll			\sys\bin\i2c.dll
 #include <../omapshared/tps65950.iby>
 
-#ifdef TSHELL_SERIAL
-	//Use VT100 Over Serial
-#	define EDISP_DRV	\EDISP_VT100.DLL
-	device[VARID]=KERNEL_DIR\BUILD_DIR\_omap3530_EUART.PDD				\sys\bin\euart.pdd
-	device[VARID]=KERNEL_DIR\BUILD_DIR\ECOMM.LDD						\sys\bin\ecomm.ldd
+#ifdef SYMBIAN_BASE_USE_GCE
+	// Use the new GCE compliant display driver  
+	extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_lcd_gce.dll	\sys\bin\lcd.dll
+	device[VARID]=KERNEL_DIR\DEBUG_DIR\display.ldd			\sys\bin\display0.ldd
+	#file=ABI_DIR\DEBUG_DIR\_beagle_ekdata.dll				\sys\bin\ekdata.dll
+	extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_serialkeyboard_uisoftkeys.dll	\sys\bin\ekeyb.dll
 #else
-	extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_lcd.dll				\sys\bin\lcd.dll
-#	ifdef TSHELL_SERIALMOUSE
-		extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_serialmouse.DLL	\sys\bin\eserialmouse.dll
-#	else
-//		extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_serialkeyboard.DLL	\sys\bin\ekeyb.dll
-#	endif
-#endif
+	#ifdef TSHELL_SERIAL
+		//Use VT100 Over Serial
+		#define EDISP_DRV	\EDISP_VT100.DLL
+		device[VARID]=KERNEL_DIR\BUILD_DIR\_omap3530_EUART.PDD				\sys\bin\euart.pdd
+		device[VARID]=KERNEL_DIR\BUILD_DIR\ECOMM.LDD						\sys\bin\ecomm.ldd
+	#else
+		extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_lcd.dll				\sys\bin\lcd.dll
+		#ifdef TSHELL_SERIALMOUSE
+			extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_serialmouse.DLL	\sys\bin\eserialmouse.dll
+		#else
+			extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_serialkeyboard.DLL	\sys\bin\ekeyb.dll
+		#endif
+	#endif
+
 extension[VARID]=KERNEL_DIR\BUILD_DIR\elocd.ldd								\sys\bin\elocd.ldd
 extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_medint.pdd					\sys\bin\medint.pdd
 device[VARID]	=KERNEL_DIR\BUILD_DIR\pipelib.ldd							\sys\bin\pipelib.ldd
@@ -129,6 +140,7 @@
 device[VARID]=	KERNEL_DIR\BUILD_DIR\usbc.ldd							\sys\bin\eusbc.ldd
 extension[VARID]=	\epoc32\release\ARMV5\BUILD_DIR\_beagle_usbv.dll					\sys\bin\usbv.DLL
 #endif
+#endif //SYMBIAN_BASE_USE_GCE
 
 //extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_beagle_ekeyb.dll	\sys\bin\ekeyb.dll
-extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_serialkeyboard.DLL	\sys\bin\ekeyb.dll
\ No newline at end of file
+//extension[VARID]=\epoc32\release\ARMV5\BUILD_DIR\_omap3530_serialkeyboard.DLL	\sys\bin\ekeyb.dll
\ No newline at end of file
--- a/omap3530/bld.inf	Thu Jul 08 11:51:55 2010 +0100
+++ b/omap3530/bld.inf	Thu Jul 22 16:29:40 2010 +0100
@@ -32,6 +32,7 @@
 // #include "omap3530_drivers/prm/bld.inf"
 #include "omap3530_drivers/uart/bld.inf"
 #include "omap3530_drivers/usbcc/bld.inf"
+#include "omap3530_drivers/euart/bld.inf"
 #include "shared/monitor/bld.inf"
 #include "shared/mstick/bld.inf"
 #include "shared/serialkeyb/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/omap3530_drivers/euart/bld.inf	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,7 @@
+// omap3530/omap3530_drivers/euart/bld.inf
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_MMPFILES
+euart
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/omap3530_drivers/euart/euart.cpp	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,557 @@
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Accenture
+//
+// Contributors:
+//
+// Description:
+// \sf\adaptation\beagleboard\omap3530\omap3530_drivers\euart\euart.cpp
+// pdd for serial ports
+// assume Modem Control Signals change cause an interrupt
+// 
+//
+
+#include <d32comm.h>
+#include <beagle\variant.h>
+#include "euart.h"
+
+#define TX_POLLING_HACK
+
+_LIT(KPddName,"Comm.Beagle");
+using namespace Omap3530Uart;
+
+DDriverComm::DDriverComm()
+//
+// Constructor
+//
+	{
+	iUnitsMask=0x7;
+	iVersion=TVersion(KCommsMajorVersionNumber,KCommsMinorVersionNumber,KCommsBuildVersionNumber);
+	}
+
+TInt DDriverComm::Install()
+//
+// Install the driver
+//
+	{
+	return SetName(&KPddName);
+	}
+
+void GetTemplateCommsCaps(TDes8 &aCaps, TInt aUnit)
+	{
+	TCommCaps2 capsBuf;
+
+	// Fill in the Caps structure with the relevant information for this Unit, e.g
+	TCommCapsV02 &c=capsBuf();
+	c.iRate=KCapsBps1200|KCapsBps2400|KCapsBps4800|KCapsBps9600|KCapsBps19200|KCapsBps38400|
+			KCapsBps57600|KCapsBps115200|KCapsBps230400|KCapsBps460800|KCapsBps4000000;
+			
+	c.iDataBits=KCapsData5|KCapsData6|KCapsData7|KCapsData8;
+	c.iStopBits=KCapsStop1|KCapsStop2;
+	c.iParity=KCapsParityNone|KCapsParityEven|KCapsParityOdd|KCapsParityMark|KCapsParitySpace;
+	c.iHandshake=0; //(OR in all KCapsObeyXXXSupported, KCapsSendXXXSupported, KCapsFailXXXSupported, KCapsFreeXXXSupported
+				    // as required for this Unit's configuration);.
+	c.iSignals=0;   //(OR in as many KCapsSignalXXXSupported as Modem control signals controllable by this Unit);
+	c.iSIR=0; 		//(0 or OR in as many KCapsSIRXXX as IR bit rates supported);
+	c.iNotificationCaps=0; //(OR in as many KNotifyXXXSupported as notifications supported by this Unit);
+	c.iFifo=0;				//(0 or KCapsHasFifo);
+	c.iRoleCaps=0;			//(0 or KCapsRoleSwitchSupported);
+	c.iFlowControlCaps=0;	//(0 or KCapsFlowControlStatusSupported);
+	/** @see TCommCapsV02 */
+
+	aCaps=capsBuf.Left(Min(capsBuf.Length(),aCaps.MaxLength()));
+	}
+
+void DDriverComm::GetCaps(TDes8 &aDes) const
+//
+// Return the drivers capabilities
+//
+	{
+	GetTemplateCommsCaps(aDes, 0);
+	}
+
+TInt DDriverComm::Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion& aVer)
+//
+// Create a driver
+//
+	{
+	DCommBeagle* pD=new DCommBeagle;
+	aChannel=pD;
+	TInt r=KErrNoMemory;
+	if (pD)
+		r=pD->DoCreate(aUnit,anInfo);
+	return r;
+	}
+
+TInt DDriverComm::Validate(TInt aUnit, const TDesC8* /*anInfo*/, const TVersion& aVer)
+//
+//	Validate the requested configuration (Version and Unit)
+//
+	{
+	if ((!Kern::QueryVersionSupported(iVersion,aVer)) || (!Kern::QueryVersionSupported(aVer,TVersion(KMinimumLddMajorVersion,KMinimumLddMinorVersion,KMinimumLddBuild))))
+		return KErrNotSupported;
+		
+	if(aUnit<0 || aUnit >2)
+		return KErrNotSupported;
+		
+	return KErrNone;
+	}
+
+DCommBeagle::DCommBeagle()
+//
+// Constructor
+//
+	{
+	gData=0;
+	iInterruptId=-1;		// -1 means not bound
+	}
+
+DCommBeagle::~DCommBeagle()
+//
+// Destructor
+//
+	{
+	if (iInterruptId>=0)
+		Interrupt::Unbind(iInterruptId);
+	
+	if (iDfcQ)
+		{
+		iDfcQ->Destroy();
+		}
+	}
+
+const TInt KDCommBeagleDfcThreadPriority = 24;
+_LIT(KDCommBeagleDfcThread,"DCommBeagleDfcThread");
+
+TInt DCommBeagle::DoCreate(TInt aUnit, const TDesC8* /*anInfo*/)
+//
+// Sets up the PDD
+//
+	{
+	iUnit=aUnit;
+
+	//  Create own DFC queue
+	TInt r = Kern::DynamicDfcQCreate(iDfcQ, KDCommBeagleDfcThreadPriority, KDCommBeagleDfcThread);
+
+	if (r != KErrNone)
+		return r; 	
+
+	// Set iPortAddr and irq with the Linear Base address of the UART and the Interrupt ID coresponding to aUnit
+	iUart = new TUart((TUartNumber)aUnit);
+	Prcm::SetClockState(iUart->PrcmInterfaceClk(), Prcm::EClkOn);
+	Prcm::SetClockState(iUart->PrcmFunctionClk(), Prcm::EClkOn);
+	
+	// bind to UART interrupt
+	r=Interrupt::Bind(iUart->InterruptId(),Isr,this);
+	if (r==KErrNone)
+		iInterruptId=iUart->InterruptId();
+	return r;
+	}
+
+TDfcQue* DCommBeagle::DfcQ(TInt aUnit)
+//
+// Return the DFC queue to be used for this device
+// For UARTs just use the standard low priority DFC queue
+// For Serial PC cards, use the PC card controller thread for the socket in question.
+//
+	{
+	return aUnit==iUnit ? iDfcQ : NULL;
+	}
+
+TInt DCommBeagle::Start()
+//
+// Start receiving characters
+//
+	{
+	if(iUnit == Kern::SuperPage().iDebugPort)
+		Variant::MarkDebugPortOff();
+	
+	iTransmitting=EFalse;			// if EnableTransmit() called before Start()
+
+	if(iUart==NULL)
+		{
+		return KErrNotReady;
+		}
+	iSignals=Signals();
+	iLdd->UpdateSignals(iSignals);
+
+	Interrupt::Enable(iInterruptId);
+	iUart->EnableInterrupt(TUart::EIntRhr);
+	return KErrNone;
+	}
+
+TBool FinishedTransmitting(TAny* aPtr)
+	{
+	DCommBeagle* self = (DCommBeagle*)aPtr;
+	if(self->iUart==NULL)
+		{
+		return ETrue;
+		}
+		
+	if(!self->iUart->TxFifoEmpty())
+		{
+		return EFalse;
+		}
+	return ETrue;
+	}
+
+void DCommBeagle::Stop(TStopMode aMode)
+//
+// Stop receiving characters
+//
+	{
+	switch (aMode)
+		{
+		case EStopNormal:
+		case EStopPwrDown:
+			iUart->DisableInterrupt(TUart::EIntRhr);
+			iUart->DisableInterrupt(TUart::EIntThr);
+			Interrupt::Disable(iInterruptId);
+			
+			// wait for uart to stop tranmitting
+			Kern::PollingWait(FinishedTransmitting,this,3,100);
+			
+			iTransmitting=EFalse;
+			
+			iUart->Disable();			
+			Prcm::SetClockState(iUart->PrcmFunctionClk(), Prcm::EClkOff);
+			break;
+		case  EStopEmergency:
+			iUart->DisableInterrupt(TUart::EIntRhr);			
+			iUart->DisableInterrupt(TUart::EIntThr);
+			Interrupt::Disable(iInterruptId);
+			iTransmitting=EFalse;
+			break;
+		}
+	}
+
+void DCommBeagle::Break(TBool aState)
+//
+// Start or stop the uart breaking
+//
+	{
+	if (aState)
+		{
+		//
+		// TO DO: (mandatory)
+		//
+		// Enable sending a Break (space) condition
+		//
+		}
+	else
+		{
+		//
+		// TO DO: (mandatory)
+		//
+		// Stop sending a Break (space) condition
+		//
+		}
+	}
+
+void DCommBeagle::EnableTransmit()
+//
+// Start sending characters.
+//
+	{
+	TBool tx=(TBool)NKern::SafeSwap((TAny*)ETrue,(TAny*&)iTransmitting);
+	if (tx)
+		{
+		return;
+		}
+	TInt r = 0;
+	#ifdef TX_POLLING_HACK
+	while (Kern::PowerGood())
+	#else
+	while (Kern::PowerGood() && !iUart->TxFifoFull())
+	#endif
+		{	
+		r=TransmitIsr();
+		if(r<0)
+			{
+			//no more to send
+			iTransmitting=EFalse;
+			break;
+			}
+		#ifdef TX_POLLING_HACK
+		while(iUart->TxFifoFull());
+		#endif
+		iUart->Write(r);
+		}
+	TInt irq=0;
+	if (!iInInterrupt)					// CheckTxBuffer adds a Dfc: can only run from ISR or with NKernel locked
+		{
+		NKern::Lock();
+		irq=NKern::DisableAllInterrupts();
+		}
+	CheckTxBuffer();
+	if (!iInInterrupt)
+		{
+		NKern::RestoreInterrupts(irq);
+		NKern::Unlock();
+		}
+	if (r>=0)											// only enable interrupt if there's more data to send
+		{
+		iUart->EnableInterrupt(TUart::EIntThr);
+		}
+	}
+
+TUint DCommBeagle::Signals() const
+//
+// Read and translate the modem lines
+//
+	{
+	TUint signals=0;
+	//
+	// TO DO: (mandatory)
+	//
+	// If the UART corresponding to iUnit supports Modem Control Signals, read them and return a bitmask with one or 
+	// more of the following OR-ed in:
+	// - KSignalDTR,
+	// - KSignalRTS,
+	// - KSignalDSR,
+	// - KSignalCTS,
+	// - KSignalDCD.
+	// 
+	return signals;
+	}
+
+void DCommBeagle::SetSignals(TUint aSetMask, TUint aClearMask)
+//
+// Set signals.
+//
+	{
+	//
+	// TO DO: (mandatory)
+	//
+	// If the UART corresponding to iUnit supports Modem Control Signals, converts the flags in aSetMask and aClearMask 
+	// into hardware-specific bitmasks to write to the UART modem/handshake output register(s). 
+	// aSetMask, aClearMask will have one or more of the following OR-ed in:
+	// - KSignalDTR,
+	// - KSignalRTS,
+	//
+	}
+
+TInt DCommBeagle::ValidateConfig(const TCommConfigV01 &aConfig) const
+//
+// Check a config structure.
+//
+	{
+	//
+	// TO DO: (mandatory)
+	//
+	// Checks the the options in aConfig are supported by the UART corresponding to iUnit
+	// May need to check:
+	//  - aConfig.iParity (contains one of EParityXXX)
+	/** @see TParity */
+	//  - aConfig.iRate (contains one of EBpsXXX)
+	/** @see TBps */
+	//  - aConfig.iDataBits (contains one of EDataXXX)
+	/** @see TDataBits */
+	//  - aConfig.iStopBits (contains one of EStopXXX)
+	/** @see TDataBits */
+	//  - aConfig.iHandshake (contains one of KConfigObeyXXX or KConfigSendXXX or KConfigFailXXX or KConfigFreeXXX)
+	//  - aConfig.iParityError (contains KConfigParityErrorFail or KConfigParityErrorIgnore or KConfigParityErrorReplaceChar)
+	//  - aConfig.iFifo (contains ether EFifoEnable or EFifoDisable)
+	/** @see TFifo */
+	//  - aConfig.iSpecialRate (may contain a rate not listed under TBps)
+	//  - aConfig.iTerminatorCount (conatains number of special characters used as terminators)
+	//  - aConfig.iTerminator[] (contains a list of special characters which can be used as terminators)
+	//  - aConfig.iXonChar (contains the character used as XON - software flow control)
+	//  - aConfig.iXoffChar (contains the character used as XOFF - software flow control)
+	//  - aConfig.iParityErrorChar (contains the character used to replace bytes received with a parity error)
+	//  - aConfig.iSIREnable (contains either ESIREnable or ESIRDisable)
+	/** @see TSir */
+	//  - aConfig.iSIRSettings (contains one of KConfigSIRXXX)
+	// and returns KErrNotSupported if the UART corresponding to iUnit does not support this configuration
+	//
+	return KErrNone;
+	}
+
+void DCommBeagle::CheckConfig(TCommConfigV01& aConfig)
+	{
+	//
+	// TO DO: (optional)
+	//
+	// Validates the default configuration that is defined when a channel is first opened
+	//
+	}
+
+TInt DCommBeagle::DisableIrqs()
+//
+// Disable normal interrupts
+//
+	{
+	
+	return NKern::DisableInterrupts(1);
+	}
+
+void DCommBeagle::RestoreIrqs(TInt aLevel)
+//
+// Restore normal interrupts
+//
+	{
+	
+	NKern::RestoreInterrupts(aLevel);
+	}
+
+void DCommBeagle::Configure(TCommConfigV01 &aConfig)
+//
+// Configure the UART from aConfig
+//
+	{
+	Kern::PollingWait(FinishedTransmitting,this,3,100);	// wait for uart to stop tranmitting
+	iUart->Disable();
+	
+	iUart->Init();
+	iUart->DefineMode(TUart::EUart);
+
+	switch(aConfig.iRate)
+		{
+		case EBps1200:
+			iUart->SetBaud(TUart::E1200);
+			break;
+		case EBps2400:
+			iUart->SetBaud(TUart::E2400);
+			break;
+		case EBps4800:
+			iUart->SetBaud(TUart::E4800);
+			break;
+		case EBps9600:
+			iUart->SetBaud(TUart::E9600);
+			break;
+		case EBps19200:
+			iUart->SetBaud(TUart::E19200);
+			break;
+		case EBps38400:
+			iUart->SetBaud(TUart::E38400);
+			break;
+		case EBps57600:
+			iUart->SetBaud(TUart::E57600);
+			break;
+		case EBps460800:
+			iUart->SetBaud(TUart::E460800);
+			break;
+		case EBps115200:
+		default:
+			iUart->SetBaud(TUart::E115200);
+		}
+	
+	TUart::TDataBits databits = (TUart::TDataBits)aConfig.iDataBits;
+	TUart::TStopBits stopbits;
+	switch(aConfig.iStopBits)
+		{
+		case EStop2:
+			stopbits=TUart::E2Stop;
+			break;
+		case EStop1:
+		default:
+			stopbits=TUart::E1Stop;		
+		}
+
+	TUart::TParity parity;	
+	switch(aConfig.iParity)
+		{
+		case EParityEven:
+			parity=TUart::EEven;
+			break;
+		case EParityOdd:
+			parity=TUart::EOdd;
+			break;
+		case EParityMark:
+			parity=TUart::EMark;
+			break;
+		case EParitySpace:
+			parity=TUart::ESpace;
+			break;
+		case EParityNone:
+		default:
+			parity=TUart::ENone;
+		}
+
+	iUart->SetDataFormat(databits, stopbits, parity);
+	iUart->EnableFifo(TUart::EEnabled, TUart::ETrigger8, TUart::ETrigger8);
+
+	iUart->Enable();
+	}
+
+void DCommBeagle::Caps(TDes8 &aCaps) const
+//
+// return our caps
+//
+	{
+	GetTemplateCommsCaps(aCaps,iUnit);
+	}
+
+void DCommBeagle::Isr(TAny* aPtr)
+//
+// Service the UART interrupt
+//
+	{
+	DCommBeagle& d=*(DCommBeagle*)aPtr;
+	d.iInInterrupt=1;										// going in...
+	TUint xon=d.iLdd->iRxXonChar;
+	TUint xoff=d.iLdd->iRxXoffChar;
+
+	// Read the interrupt source register to determine if it is a Receive, Transmit or Modem Signals change interrupt.
+	// If required also, clear interrupts at the source.
+	// Then process the interrupt condition as in the following pseudo-code extract:
+	//
+	TUint interruptId = IIR::iMem.Read(*(d.iUart));
+	TUint interruptEn = IER::iMem.Read(*(d.iUart));	
+	
+	if((interruptId & IIR::IT_TYPE::ETHR) && (interruptEn & IER::THR_IT::KMask) )
+		{
+		while(Kern::PowerGood() && !d.iUart->TxFifoFull())	
+			{
+			TInt r=d.TransmitIsr();
+			if(r<0)
+				{
+				// Disable the Transmit Interrupt in Hardware
+				d.iUart->DisableInterrupt(TUart::EIntThr);
+				d.iTransmitting=EFalse;
+				break;
+				}
+			d.iUart->Write(r);
+			}
+		d.CheckTxBuffer();
+		}
+		
+	if((interruptId & IIR::IT_TYPE::ERHR) && (interruptEn & IER::RHR_IT::KMask) )
+		{
+		TUint rx[32];
+		TInt rxi=0;
+		TInt x=0;
+
+		while(!d.iUart->RxFifoEmpty() && rxi<32)
+			{
+			TUint ch = d.iUart->Read();
+			if (ch==xon)
+				x=1;
+			else if (ch==xoff)
+				x=-1;
+			else
+				rx[rxi++]=ch;
+			}
+		d.ReceiveIsr(rx,rxi,x);
+		}
+
+	if((interruptId & IIR::IT_TYPE::EModem) && (interruptEn & IER::MODEM_STS_IT::KMask) )
+		{
+		TUint signals=d.Signals()&KDTEInputSignals;
+		if (signals != d.iSignals)
+			{
+			d.iSignals=signals;
+			d.iLdd->StateIsr(signals);
+			}
+		}
+	d.iInInterrupt=0;										// going out...
+	}
+
+DECLARE_STANDARD_PDD()
+	{
+	return new DDriverComm;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/omap3530_drivers/euart/euart.h	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* 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:
+* Accenture
+*
+* Contributors:
+*
+* Description: Minimalistic serial driver
+*
+*/
+
+#ifndef _BEAGLE_SERIAL_H
+#define _BEAGLE_SERIAL_H
+
+#include <comm.h>
+#include <e32hal.h>
+#include <omap3530_prcm.h>
+#include <omap3530_uart.h>
+
+const TInt KMinimumLddMajorVersion=1;
+const TInt KMinimumLddMinorVersion=1;
+const TInt KMinimumLddBuild=122;
+
+class DDriverComm : public DPhysicalDevice
+	{
+public:
+	DDriverComm();
+	virtual TInt Install();
+	virtual void GetCaps(TDes8 &aDes) const;
+	virtual TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+	virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+	};
+
+class DCommBeagle : public DComm
+	{
+public:
+	DCommBeagle();
+	~DCommBeagle();
+	TInt DoCreate(TInt aUnit, const TDesC8* anInfo);
+public:
+	virtual TInt Start();
+	virtual void Stop(TStopMode aMode);
+	virtual void Break(TBool aState);
+	virtual void EnableTransmit();
+	virtual TUint Signals() const;
+	virtual void SetSignals(TUint aSetMask,TUint aClearMask);
+	virtual TInt ValidateConfig(const TCommConfigV01 &aConfig) const;
+	virtual void Configure(TCommConfigV01 &aConfig);
+	virtual void Caps(TDes8 &aCaps) const;
+	virtual TInt DisableIrqs();
+	virtual void RestoreIrqs(TInt aIrq);
+	virtual TDfcQue* DfcQ(TInt aUnit);
+	virtual void CheckConfig(TCommConfigV01& aConfig);
+public:
+	static void Isr(TAny* aPtr);
+public:
+	TInt iInterruptId;
+	TInt iUnit;
+	TLinAddr iPortAddr;
+	TInt iInInterrupt;
+	TUint iSignals;
+	TDynamicDfcQue*	iDfcQ;
+	Omap3530Uart::TUart*	iUart;
+	TInt gData;
+	};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/omap3530_drivers/euart/euart.mmp	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,37 @@
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Accenture
+//
+// Contributors:
+//
+// Description:
+// omap3530\omap3530_drivers\euart\euart.mmp
+// 
+//
+
+#include "beagle/variant.mmh"
+#include <assp/omap3530_assp/assp.mmh>
+#include "kernel/kern_ext.mmh"
+
+target				AsspTarget(euart,pdd)
+targettype			pdd
+romtarget			euart.pdd
+
+systeminclude		.
+systeminclude		+/include/assp/omap3530_assp
+systeminclude		+/include/platform/drivers
+
+sourcepath 			.
+source				euart.cpp
+
+library				AsspTarget(kaomap3530,lib) AsspTarget(uart,lib) VariantTarget(ecust,lib) AsspTarget(prcm,lib)
+
+uid					0 0x1000015b
+
+VENDORID 0x70000001
+
+capability			all
--- a/omap3530/shared/serialkeyb/bld.inf	Thu Jul 08 11:51:55 2010 +0100
+++ b/omap3530/shared/serialkeyb/bld.inf	Thu Jul 22 16:29:40 2010 +0100
@@ -19,3 +19,4 @@
 
 PRJ_MMPFILES
 serialkeyboard
+serialkeyboard_UI_Softkeys
--- a/omap3530/shared/serialkeyb/serialkeyboard.cpp	Thu Jul 08 11:51:55 2010 +0100
+++ b/omap3530/shared/serialkeyb/serialkeyboard.cpp	Thu Jul 22 16:29:40 2010 +0100
@@ -32,6 +32,7 @@
 #define ISFUNC(x)  (0x4000&(x))
 #define STDKEY(x)    (0x1FFF&(x))
 
+#if _UI_SOFTKEYS_ENABLED_
 static const TUint16 KScanCode[] =
 	{
 	/*00*/	EStdKeyNull,
@@ -164,6 +165,141 @@
 	/*7f*/	EKeyDelete
 	};
 
+#else
+static const TUint16 KScanCode[] =
+	{
+	/*00*/	EStdKeyNull,
+	/*01*/	EStdKeyHome,				// ^A
+	/*02*/	EStdKeyLeftArrow,			// ^B
+	/*03*/	EStdKeyEscape,				// ^C
+	/*04*/	SHIFTED(EStdKeyDownArrow),	// ^D - move window down
+	/*05*/	EStdKeyEnd,					// ^E
+	/*06*/	EStdKeyRightArrow,			// ^F
+	/*07*/	EStdKeyNull,
+	/*08*/	EStdKeyBackspace,			// ^H - Reserved!
+	/*09*/	EStdKeyTab,					// ^I - Reserved!
+	/*0a*/	EStdKeyNull,
+	/*0b*/	EStdKeyIncContrast,			// ^K
+	/*0c*/	EStdKeyDecContrast,			// ^L
+	/*0d*/	EStdKeyEnter,				// ^M - Reserved!
+	/*0e*/	EStdKeyDownArrow,			// ^N
+	/*0f*/	EStdKeyNull,				// ^O = instant death
+	/*10*/	EStdKeyUpArrow,				// ^P
+	/*11*/	CTRLED(EStdKeyLeftArrow),	// ^Q - make window narrower
+	/*12*/	CTRLED(FUNCED('5')),		// ^R - rotate windows in text window server
+	/*13*/	EStdKeyNull,
+	/*14*/	CTRLED(EStdKeyDownArrow),	// ^T - make window taller
+	/*15*/	SHIFTED(EStdKeyUpArrow),	// ^U - move window up
+	/*16*/	EStdKeyNull,
+	/*17*/	CTRLED(EStdKeyRightArrow),	// ^W - make window wider
+	/*18*/	SHIFTED(EStdKeyRightArrow),	// ^X - move window right
+	/*19*/	CTRLED(EStdKeyUpArrow),		// ^Y - make window shorter
+	/*1a*/	SHIFTED(EStdKeyLeftArrow),	// ^Z - move window left
+	/*1b*/	EStdKeyEscape,				// ^[ - Reserved!
+	/*1c*/	EStdKeyNull,
+	/*1d*/	EStdKeyNull,
+	/*1e*/	EStdKeyNull,
+	/*1f*/	EStdKeyNull,
+	/*20*/	EStdKeySpace,
+	/*21*/	SHIFTED('1'),		// !
+	/*22*/	SHIFTED('2'),		// "
+	/*23*/	EStdKeyHash,		// #
+	/*24*/	SHIFTED('4'),		// $
+	/*25*/	SHIFTED('5'),		// %
+	/*26*/	SHIFTED('7'),		// &
+	/*27*/	EStdKeySingleQuote,
+	/*28*/	SHIFTED('9'),		// (
+	/*29*/	SHIFTED('0'),		// )
+	/*2a*/	SHIFTED('8'),		// *
+	/*2b*/	SHIFTED(EStdKeyEquals),	// +
+	/*2c*/	EStdKeyComma,
+	/*2d*/	EStdKeyMinus,
+	/*2e*/	EStdKeyFullStop,
+	/*2f*/	EStdKeyForwardSlash,
+	/*30*/	'0',
+	/*31*/	'1',
+	/*32*/	'2',
+	/*33*/	'3',
+	/*34*/	'4',
+	/*35*/	'5',
+	/*36*/	'6',
+	/*37*/	'7',
+	/*38*/	'8',
+	/*39*/	'9',
+	/*3a*/	SHIFTED(EStdKeySemiColon),	// :
+	/*3b*/	EStdKeySemiColon,
+	/*3c*/	SHIFTED(EStdKeyComma),		// <
+	/*3d*/	EStdKeyEquals,
+	/*3e*/	SHIFTED(EStdKeyFullStop),	// >
+	/*3f*/	SHIFTED(EStdKeyForwardSlash),	// ?
+	/*40*/	SHIFTED(EStdKeySingleQuote),	// @
+	/*41*/	SHIFTED('A'),
+	/*42*/	SHIFTED('B'),
+	/*43*/	SHIFTED('C'),
+	/*44*/	SHIFTED('D'),
+	/*45*/	SHIFTED('E'),
+	/*46*/	SHIFTED('F'),
+	/*47*/	SHIFTED('G'),
+	/*48*/	SHIFTED('H'),
+	/*49*/	SHIFTED('I'),
+	/*4a*/	SHIFTED('J'),
+	/*4b*/	SHIFTED('K'),
+	/*4c*/	SHIFTED('L'),
+	/*4d*/	SHIFTED('M'),
+	/*4e*/	SHIFTED('N'),
+	/*4f*/	SHIFTED('O'),
+	/*50*/	SHIFTED('P'),
+	/*51*/	SHIFTED('Q'),
+	/*52*/	SHIFTED('R'),
+	/*53*/	SHIFTED('S'),
+	/*54*/	SHIFTED('T'),
+	/*55*/	SHIFTED('U'),
+	/*56*/	SHIFTED('V'),
+	/*57*/	SHIFTED('W'),
+	/*58*/	SHIFTED('X'),
+	/*59*/	SHIFTED('Y'),
+	/*5a*/	SHIFTED('Z'),
+	/*5b*/	EStdKeySquareBracketLeft,
+	/*5c*/	EStdKeyBackSlash,
+	/*5d*/	EStdKeySquareBracketRight,
+	/*5e*/	SHIFTED('6'),			// ^
+	/*5f*/	SHIFTED(EStdKeyMinus),	// _
+	/*60*/	EStdKeyBacklightToggle,	// Actually `
+	/*61*/	'A',
+	/*62*/	'B',
+	/*63*/	'C',
+	/*64*/	'D',
+	/*65*/	'E',
+	/*66*/	'F',
+	/*67*/	'G',
+	/*68*/	'H',
+	/*69*/	'I',
+	/*6a*/	'J',
+	/*6b*/	'K',
+	/*6c*/	'L',
+	/*6d*/	'M',
+	/*6e*/	'N',
+	/*6f*/	'O',
+	/*70*/	'P',
+	/*71*/	'Q',
+	/*72*/	'R',
+	/*73*/	'S',
+	/*74*/	'T',
+	/*75*/	'U',
+	/*76*/	'V',
+	/*77*/	'W',
+	/*78*/	'X',
+	/*79*/	'Y',
+	/*7a*/	'Z',
+	/*7b*/	SHIFTED(EStdKeySquareBracketLeft),
+	/*7c*/	SHIFTED(EStdKeyBackSlash),
+	/*7d*/	SHIFTED(EStdKeySquareBracketRight),
+	/*7e*/	SHIFTED(EStdKeyHash),
+	/*7f*/	EKeyDelete
+	};
+
+#endif
+
 static const TUint16 KEscapedScanCode[] =
 	{
 	EStdKeyUpArrow,
@@ -310,7 +446,6 @@
 			}
 		else
 			{
-			Kern::Printf("Key received: %d %d", self->iKey, KScanCode[self->iKey]);
 			self->AddKey( KScanCode[ self->iKey ] );
 			}
 		break;
@@ -362,7 +497,6 @@
 
 	TRawEvent e;
 
-	Kern::Printf("AddKey %d %d %d %d", shifted, ctrl, func, stdKey);
 	
 	if ( func )
 		{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/shared/serialkeyb/serialkeyboard_UI_Softkeys.mmp	Thu Jul 22 16:29:40 2010 +0100
@@ -0,0 +1,52 @@
+// Copyright (c) 2004-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:
+// omap3530/shared/serialkeyb/serialkeyboard.mmp
+// omap3530/shared/serialkeyb.serialkeyboard.mmp
+// Simple serial keyboard implementation for Beagle baseport
+//
+
+
+
+/**
+ @file
+*/
+macro	_UI_SOFTKEYS_ENABLED_
+
+#define __USING_ASSP_REGISTER_API__
+#define __USING_ASSP_INTERRUPT_API__
+
+#include			"beagle/variant.mmh"
+#include			"kernel/kern_ext.mmh"
+
+target				AsspTarget(serialkeyboard_uisoftkeys,dll)
+targettype			kext
+romtarget			ekeyb.dll
+
+systeminclude			+/include/drivers
+
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+sourcepath			.
+source				serialkeyboard.cpp
+
+library				AsspTarget(uart,lib)
+library				AsspTarget(prcm,lib)
+//library				resman.lib
+
+noexportlibrary
+
+uid					0x100039cf 0x100000db
+
+VENDORID 0x70000001
+
+capability			all