omap3530/omap3530_drivers/euart/euart.h
author george.norton
Thu, 01 Jul 2010 17:46:13 +0100
changeset 38 cdb163c0843f
permissions -rw-r--r--
Initial contribution of the euart driver by Accenture. Known issues ============ When the FIFO is enabled we seem to get some dropped characters, as a temporary workaround a polling mode is enabled.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     1
/*
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     2
* This component and the accompanying materials are made available
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     3
* under the terms of the License "Eclipse Public License v1.0"
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     4
* which accompanies this distribution, and is available
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     5
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     6
*
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     7
* Initial Contributors:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     8
* Accenture
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
     9
*
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    10
* Contributors:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    11
*
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    12
* Description: Minimalistic serial driver
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    13
*
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    14
*/
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    15
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    16
#ifndef _BEAGLE_SERIAL_H
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    17
#define _BEAGLE_SERIAL_H
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    18
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    19
#include <comm.h>
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    20
#include <e32hal.h>
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    21
#include <omap3530_prcm.h>
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    22
#include <omap3530_uart.h>
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    23
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    24
const TInt KMinimumLddMajorVersion=1;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    25
const TInt KMinimumLddMinorVersion=1;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    26
const TInt KMinimumLddBuild=122;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    27
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    28
class DDriverComm : public DPhysicalDevice
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    29
	{
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    30
public:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    31
	DDriverComm();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    32
	virtual TInt Install();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    33
	virtual void GetCaps(TDes8 &aDes) const;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    34
	virtual TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    35
	virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    36
	};
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    37
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    38
class DCommBeagle : public DComm
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    39
	{
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    40
public:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    41
	DCommBeagle();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    42
	~DCommBeagle();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    43
	TInt DoCreate(TInt aUnit, const TDesC8* anInfo);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    44
public:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    45
	virtual TInt Start();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    46
	virtual void Stop(TStopMode aMode);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    47
	virtual void Break(TBool aState);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    48
	virtual void EnableTransmit();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    49
	virtual TUint Signals() const;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    50
	virtual void SetSignals(TUint aSetMask,TUint aClearMask);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    51
	virtual TInt ValidateConfig(const TCommConfigV01 &aConfig) const;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    52
	virtual void Configure(TCommConfigV01 &aConfig);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    53
	virtual void Caps(TDes8 &aCaps) const;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    54
	virtual TInt DisableIrqs();
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    55
	virtual void RestoreIrqs(TInt aIrq);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    56
	virtual TDfcQue* DfcQ(TInt aUnit);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    57
	virtual void CheckConfig(TCommConfigV01& aConfig);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    58
public:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    59
	static void Isr(TAny* aPtr);
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    60
public:
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    61
	TInt iInterruptId;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    62
	TInt iUnit;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    63
	TLinAddr iPortAddr;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    64
	TInt iInInterrupt;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    65
	TUint iSignals;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    66
	TDynamicDfcQue*	iDfcQ;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    67
	Omap3530Uart::TUart*	iUart;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    68
	TInt gData;
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    69
	};
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    70
cdb163c0843f Initial contribution of the euart driver by Accenture.
george.norton
parents:
diff changeset
    71
#endif