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