[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/SixAxisTransmitter SixAxisTransmitter.nc, 1.1, 1.2 SixAxisTransmitterM.nc, 1.4, 1.5

steve ayer ayer1 at users.sourceforge.net
Tue Nov 27 05:47:35 PST 2007


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/SixAxisTransmitter
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv1000

Modified Files:
	SixAxisTransmitter.nc SixAxisTransmitterM.nc 
Log Message:

bug fix for xt2 setup in SixAxisTransmitterM.nc:  when setting up the
bcsctl2 register, i failed to initialized it to 0 (clear it) before
doing configuration. whatever garbage was inside upon startup was
causing the smclk to stay attached to the dco instead of the fast clock.

also, blitzed some unused, commented-out items in both files.


Index: SixAxisTransmitter.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/SixAxisTransmitter/SixAxisTransmitter.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SixAxisTransmitter.nc	26 Apr 2007 12:47:03 -0000	1.1
--- SixAxisTransmitter.nc	27 Nov 2007 13:47:33 -0000	1.2
***************
*** 55,73 ****
    /* have to fix compile time channel limitation */
    SixAxisTransmitterM.DMA0         -> DMA_M.DMA[0];
-   //  SixAxisTransmitterM.DMA1         -> DMA_M.DMA[1];
-   //  SixAxisTransmitterM.DMA2         -> DMA_M.DMA[2];
    SixAxisTransmitterM.Leds         -> LedsC;
    SixAxisTransmitterM.sampleTimer       -> TimerC.Timer[unique("Timer")];
   
-   //  SixAxisTransmitterM.SDStdControl      -> SDC;
-   //  SixAxisTransmitterM.SD                -> SD_M;
- 
    SixAxisTransmitterM.AccelStdControl   -> MMA7260_AccelM;
    SixAxisTransmitterM.Accel             -> MMA7260_AccelM;
  
-   //  TimeM.LocalTime              -> TimerC;
-   //  SixAxisTransmitterM.LocalTime       -> TimerC;
- 
-   /* telnet stuff */
    SixAxisTransmitterM.IPStdControl  -> IPClientC;
    SixAxisTransmitterM.UIP           -> IPClientC;
--- 55,64 ----
***************
*** 85,88 ****
    ParamViewM.ParamView          -> IPClientC.ParamView;
    ParamViewM.ParamView          -> SixAxisTransmitterM.ParamView;
!   /* end telnet stuff */
  }
--- 76,79 ----
    ParamViewM.ParamView          -> IPClientC.ParamView;
    ParamViewM.ParamView          -> SixAxisTransmitterM.ParamView;
! 
  }

Index: SixAxisTransmitterM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/SixAxisTransmitter/SixAxisTransmitterM.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SixAxisTransmitterM.nc	14 Sep 2007 19:11:53 -0000	1.4
--- SixAxisTransmitterM.nc	27 Nov 2007 13:47:33 -0000	1.5
***************
*** 76,80 ****
    uint8_t enable_shipping = 0;
    norace uint8_t current_buffer = 0, dma_blocks = 0;
!   uint16_t sbuf0[42], sbuf1[42], dmadain, wheressbuf0, sample_period = 5;
    uint8_t msgbuf[128];
    struct udp_address udpaddr;
--- 76,80 ----
    uint8_t enable_shipping = 0;
    norace uint8_t current_buffer = 0, dma_blocks = 0;
!   uint16_t sbuf0[42], sbuf1[42], dmadain, sample_period = 5;
    uint8_t msgbuf[128];
    struct udp_address udpaddr;
***************
*** 94,98 ****
      call DMA0.setBlockSize(6);
  
!     // we want block transfer, repeated
      DMA0CTL = DMADT_1 + DMADSTINCR_3 + DMASRCINCR_3;
  
--- 94,98 ----
      call DMA0.setBlockSize(6);
  
!     // we want block transfer, single
      DMA0CTL = DMADT_1 + DMADSTINCR_3 + DMASRCINCR_3;
  
***************
*** 161,166 ****
      register uint8_t i;
  
-     wheressbuf0 = (uint16_t)&sbuf0;
- 
      atomic CLR_FLAG(BCSCTL1, XT2OFF);
  
--- 161,164 ----
***************
*** 178,182 ****
      call Leds.yellowOn();
      TOSH_uwait(50000UL);
!     atomic SET_FLAG(BCSCTL2, SELM_2);
      
      call Leds.yellowOff();
--- 176,184 ----
      call Leds.yellowOn();
      TOSH_uwait(50000UL);
! 
!     atomic{
!       BCSCTL2 = 0;
!       SET_FLAG(BCSCTL2, SELM_2);
!     }
      
      call Leds.yellowOff();
***************
*** 464,468 ****
  
    const struct Param s_DMARegs[] = {
-     { "sbuf0"  ,      PARAM_TYPE_HEX16, (uint16_t *)&wheressbuf0},
      { "dmadaIN",      PARAM_TYPE_HEX16, (uint16_t *)&dmadain},
      { "dma0daOUT",    PARAM_TYPE_HEX16, (uint16_t *)&DMA0DA},
--- 466,469 ----



More information about the Tinyos-contrib-commits mailing list