0
|
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 |
|
|
19 |
#ifndef __IIC_PSL_H__
|
|
20 |
#define __IIC_PSL_H__
|
|
21 |
|
|
22 |
const TInt KIicPslNumOfChannels = 3; // Arbitrary value - represents the number of channels supported
|
|
23 |
|
|
24 |
const TUint KIicPslInterruptsAll = 0xFF; // Arbitrary value, for template
|
|
25 |
const TUint KIicPslRxInterrupt = 0x1; // Arbitrary value, for template
|
|
26 |
const TUint KIicPslTxInterrupt = 0x2; // Arbitrary value, for template
|
|
27 |
|
|
28 |
const TInt KTimeoutValue = 5; // guard-timer timeout value (in ms)
|
|
29 |
|
|
30 |
// Array of pointers to the channels that are created by the PSL.
|
|
31 |
// The array is used to register these channels with the IIC Bus Controller
|
|
32 |
extern DIicBusChannel* ChannelPtrArray[KIicPslNumOfChannels];
|
|
33 |
|
|
34 |
|
|
35 |
// A bit-field to store the current mode of operation
|
|
36 |
struct TIicOperationType
|
|
37 |
{
|
|
38 |
enum TOperation
|
|
39 |
{
|
|
40 |
ENop = 0x00,
|
|
41 |
ETransmitOnly = 0x01,
|
|
42 |
EReceiveOnly = 0x02,
|
|
43 |
ETransmitReceive = 0x03
|
|
44 |
};
|
|
45 |
|
|
46 |
struct TOp
|
|
47 |
{
|
|
48 |
TUint8 iIsTransmitting : 1;
|
|
49 |
TUint8 iIsReceiving : 1;
|
|
50 |
TUint8 iRest : 6;
|
|
51 |
};
|
|
52 |
|
|
53 |
union
|
|
54 |
{
|
|
55 |
TOp iOp;
|
|
56 |
TUint8 iValue;
|
|
57 |
};
|
|
58 |
};
|
|
59 |
|
|
60 |
#endif /*__IIC_PSL_H__*/
|