author | Lukasz Forynski <lukasz.forynski@gmail.com> |
Wed, 22 Sep 2010 23:33:25 +0100 | |
branch | Beagle_BSP_dev |
changeset 82 | 65b40f262685 |
parent 77 | e5fd00cbb70a |
child 84 | 09e266454dcf |
permissions | -rw-r--r-- |
77
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
1 |
// This component and the accompanying materials are made available |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
2 |
// under the terms of the License "Eclipse Public License v1.0" |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
3 |
// which accompanies this distribution, and is available |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
4 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
5 |
// |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
6 |
// Initial Contributors: |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
7 |
// lukasz.forynski@gmail.com |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
8 |
// |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
9 |
// Contributors: |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
10 |
// |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
11 |
// |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
12 |
// Description: |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
13 |
// omap3530/omap3530_drivers/spi/spi.mmp |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
14 |
// |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
15 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
16 |
#include <assp/omap3530_assp/assp.mmh> |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
17 |
//#include "kernel/kern_ext.mmh" // this is already included from iic_channel.mmh |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
18 |
// ..and probably it shouldn't be |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
19 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
20 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
21 |
// Select the mode to build |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
22 |
// For Master-Slave mode, uncomment both MASTER and SLAVE defines |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
23 |
#define __USE_MASTER_MODE__ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
24 |
//#define __USE_SLAVE_MODE__ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
25 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
26 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
27 |
//macro STANDALONE_CHANNEL |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
28 |
//#define STANDALONE_CHANNEL /*Only for iic_channel.mmh to pick up the needed source files*/ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
29 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
30 |
// PSL source |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
31 |
SOURCEPATH . |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
32 |
SOURCE psl_init.cpp |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
33 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
34 |
#ifdef __USE_MASTER_MODE__ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
35 |
macro MASTER_MODE |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
36 |
SOURCE master.cpp |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
37 |
#endif |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
38 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
39 |
#ifdef __USE_SLAVE_MODE__ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
40 |
macro SLAVE_MODE |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
41 |
SOURCE slave.cpp |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
42 |
#endif |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
43 |
|
82
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
44 |
// define one of the below values to switch PIN modes for McSPI3 to match your PCB connections. |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
45 |
// i.e. McSPI3 can be routed to 3 different pin sets using below defines - if both commented out |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
46 |
// the default routing is used, which takes McSPI3 out to the extension header (beagleboard). |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
47 |
// See omap3530_spi.h for more details. |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
48 |
//macro SPI_MODULE_3_PIN_OPTION_2 |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
49 |
//macro SPI_MODULE_3_PIN_OPTION_3 |
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
50 |
|
77
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
51 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
52 |
// PIL source |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
53 |
#include "../../../../../os/kernelhwsrv/kernel/eka/drivers/iic/iic_channel.mmh" |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
54 |
sourcepath ../../../../../os/kernelhwsrv/kernel/eka/drivers/iic/ |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
55 |
source IIC_PIL_SOURCE |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
56 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
57 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
58 |
TARGET AsspTarget(spi,dll) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
59 |
TARGETTYPE kext |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
60 |
LINKAS spi.dll |
82
65b40f262685
updated cs pin handling
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
77
diff
changeset
|
61 |
|
77
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
62 |
//DEFFILE ./def/~/spi.def |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
63 |
NOSTRICTDEF |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
64 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
65 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
66 |
USERINCLUDE . |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
67 |
SYSTEMINCLUDE +\include\assp\omap3530_assp |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
68 |
SYSTEMINCLUDE +\include\drivers |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
69 |
SYMBIAN_BASE_SYSTEMINCLUDE(assp/omap3530_assp) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
70 |
SYMBIAN_BASE_SYSTEMINCLUDE(drivers) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
71 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
72 |
LIBRARY AsspTarget(kaomap3530,lib) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
73 |
LIBRARY AsspTarget(prcm,lib) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
74 |
LIBRARY AsspTarget(gpio,lib) |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
75 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
76 |
// #ifdef USE_SYMBIAN_PRM? |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
77 |
//library resman.lib |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
78 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
79 |
EPOCALLOWDLLDATA |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
80 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
81 |
CAPABILITY all |
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
82 |
|
e5fd00cbb70a
Added IIC SPI implementation / tests (Master channel only)
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff
changeset
|
83 |
VENDORID 0x70000001 |