equal
deleted
inserted
replaced
27 #include <assp/omap3530_assp/omap3530_prcm.h> |
27 #include <assp/omap3530_assp/omap3530_prcm.h> |
28 #include <nk_priv.h> |
28 #include <nk_priv.h> |
29 #include <nklib.h> |
29 #include <nklib.h> |
30 //#include <resourceman.h> |
30 //#include <resourceman.h> |
31 |
31 |
|
32 #ifdef USE_SYMBIAN_PRM |
32 _LIT(KDfcName, "I2C_DFC"); // Not used by the I2c dfc! |
33 _LIT(KDfcName, "I2C_DFC"); // Not used by the I2c dfc! |
|
34 #endif |
|
35 |
33 DECLARE_STANDARD_EXTENSION() |
36 DECLARE_STANDARD_EXTENSION() |
34 { |
37 { |
35 return KErrNone; |
38 return KErrNone; |
36 } |
39 } |
37 |
40 |
70 TRate iRate; |
73 TRate iRate; |
71 TDeviceAddress iOwnAddress; |
74 TDeviceAddress iOwnAddress; |
72 |
75 |
73 // The DFC for this unit - it runs on the thread associated with the active transfer |
76 // The DFC for this unit - it runs on the thread associated with the active transfer |
74 TDfc iDfc; |
77 TDfc iDfc; |
|
78 |
75 |
79 |
76 // the slave devices on this unit's bus |
80 // the slave devices on this unit's bus |
77 TDeviceControl iDevice[KMaxDevicesPerUnit]; |
81 TDeviceControl iDevice[KMaxDevicesPerUnit]; |
78 TInt iNumDevices; |
82 TInt iNumDevices; |
79 |
83 |
160 iNextPhase(0) |
164 iNextPhase(0) |
161 {} |
165 {} |
162 |
166 |
163 EXPORT_C THandle Open(const TConfigPb& aConfig) |
167 EXPORT_C THandle Open(const TConfigPb& aConfig) |
164 { |
168 { |
|
169 #ifdef USE_SYMBIAN_PRM |
165 //TInt r = PowerResourceManager::RegisterClient( prmClientId, KDfcName ); |
170 //TInt r = PowerResourceManager::RegisterClient( prmClientId, KDfcName ); |
166 //__NK_ASSERT_ALWAYS(r==KErrNone); |
171 //__NK_ASSERT_ALWAYS(r==KErrNone); |
|
172 #error FIXME: the DFC, along with the associated dfcq have to be created (e.g. in DLL entry point?) |
|
173 #endif |
167 THandle h; |
174 THandle h; |
168 __NK_ASSERT_ALWAYS(aConfig.iVersion == I2C_VERSION); |
175 __NK_ASSERT_ALWAYS(aConfig.iVersion == I2C_VERSION); |
169 if (aConfig.iUnit >= E1 && aConfig.iUnit <= E3) |
176 if (aConfig.iUnit >= E1 && aConfig.iUnit <= E3) |
170 { |
177 { |
171 TUnitControl& unit = gUcb[aConfig.iUnit]; |
178 TUnitControl& unit = gUcb[aConfig.iUnit]; |