[Tinyos-2-commits] CVS: tinyos-2.x/tos/sensorboards/im2sb
Tsl2561InternalC.nc, 1.1.2.3, 1.1.2.4 Tsl2561InternalP.nc,
1.1.2.1, 1.1.2.2
Philip Buonadonna
philipb at users.sourceforge.net
Thu Nov 2 18:27:03 PST 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/im2sb
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9083
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
Tsl2561InternalC.nc Tsl2561InternalP.nc
Log Message:
Added overrids for the Alert edge detection
Index: Tsl2561InternalC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/im2sb/Tsl2561InternalC.nc,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** Tsl2561InternalC.nc 15 Aug 2006 11:59:09 -0000 1.1.2.3
--- Tsl2561InternalC.nc 3 Nov 2006 02:27:01 -0000 1.1.2.4
***************
*** 52,57 ****
components new HplTSL2561LogicP(TSL2561_SLAVE_ADDR) as Logic;
! MainC.SoftwareInit -> Logic;
components GeneralIOC;
Logic.InterruptAlert -> GeneralIOC.GpioInterrupt[GPIO_TSL2561_LIGHT_INT];
--- 52,59 ----
components new HplTSL2561LogicP(TSL2561_SLAVE_ADDR) as Logic;
! //MainC.SoftwareInit -> Logic;
+ components LedsC;
+ Logic.Leds -> LedsC;
components GeneralIOC;
Logic.InterruptAlert -> GeneralIOC.GpioInterrupt[GPIO_TSL2561_LIGHT_INT];
***************
*** 64,69 ****
HplTSL256x = Internal.HplTSL256x;
Internal.ToHPLC -> Logic.HplTSL256x;
!
SplitControl = Logic;
components HplPXA27xGPIOC;
--- 66,72 ----
HplTSL256x = Internal.HplTSL256x;
Internal.ToHPLC -> Logic.HplTSL256x;
! Internal.SubInit -> Logic.Init;
SplitControl = Logic;
+ MainC.SoftwareInit -> Internal;
components HplPXA27xGPIOC;
Index: Tsl2561InternalP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/im2sb/Tsl2561InternalP.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** Tsl2561InternalP.nc 6 Jul 2006 23:26:24 -0000 1.1.2.1
--- Tsl2561InternalP.nc 3 Nov 2006 02:27:01 -0000 1.1.2.2
***************
*** 35,40 ****
--- 35,43 ----
*/
module Tsl2561InternalP {
+ provides interface Init;
provides interface HplTSL256x[uint8_t id];
+ uses interface Init as SubInit;
uses interface HplTSL256x as ToHPLC;
+ uses interface GpioInterrupt as InterruptAlert;
}
***************
*** 42,45 ****
--- 45,56 ----
uint8_t currentId;
+ command error_t Init.init() {
+ call SubInit.init();
+ // The Intel Mote 2 Sensorboard multiplexes the TSL interrupt through a NAND
+ // gate. Need to overrid the edge trigger from the driver default
+ call InterruptAlert.enableRisingEdge();
+ return SUCCESS;
+ }
+
command error_t HplTSL256x.measureCh0[uint8_t id]() {
currentId = id;
***************
*** 103,106 ****
--- 114,119 ----
}
+ async event InterruptAlert.fired() {}
+
default async event void HplTSL256x.measureCh0Done[uint8_t id]( error_t error, uint16_t val ){ return; }
default async event void HplTSL256x.measureCh1Done[uint8_t id]( error_t error, uint16_t val ){ return; }
More information about the Tinyos-2-commits
mailing list