[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/MOBIUS/AccelGyro AccelGyroM.nc, 1.1, 1.2

steve ayer ayer1 at users.sourceforge.net
Wed Dec 19 07:35:51 PST 2007


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

Modified Files:
	AccelGyroM.nc 
Log Message:

all files:
---------
bluetooth api updates used: disableRemoteConfig() and setBaudrate().

xt2 bug fixes added (bcsctl2 init) 
dma transfer bug fix (changed dmadt_5, repeat, to dmadt_1, single
transfer).

SixAxisCmdCtrlM.nc only:
-----------------------
fixed datatype mismatch bug in sample frequency change routine.


Index: AccelGyroM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/MOBIUS/AccelGyro/AccelGyroM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AccelGyroM.nc	19 Nov 2007 18:51:02 -0000	1.1
--- AccelGyroM.nc	19 Dec 2007 15:35:49 -0000	1.2
***************
*** 115,122 ****
  
    norace uint8_t current_buffer = 0, dma_blocks = 0;
!   uint16_t sbuf0[36], sbuf1[36], wheressbuf0, timestamp0, timestamp1;
  
    /* default sample frequency every time the sensor boots up */
!   uint16_t sample_freq = SAMPLING_50HZ;
  
    bool enable_sending, command_mode_complete, activity_led_on;
--- 115,122 ----
  
    norace uint8_t current_buffer = 0, dma_blocks = 0;
!   uint16_t sbuf0[36], sbuf1[36], timestamp0, timestamp1;
  
    /* default sample frequency every time the sensor boots up */
!   uint16_t sample_freq = SAMPLING_100HZ;
  
    bool enable_sending, command_mode_complete, activity_led_on;
***************
*** 145,150 ****
      call DMA0.setBlockSize(7);
  
!     // we want block transfer, repeated
!     DMA0CTL = DMADT_5 + DMADSTINCR_3 + DMASRCINCR_3;
    }
  
--- 145,150 ----
      call DMA0.setBlockSize(7);
  
!     // we want block transfer, single
!     DMA0CTL = DMADT_1 + DMADSTINCR_3 + DMASRCINCR_3;
    }
  
***************
*** 203,208 ****
      register uint8_t i;
  
-     wheressbuf0 = (uint16_t)&sbuf0;
- 
      atomic CLR_FLAG(BCSCTL1, XT2OFF); // basic clock system control reg, turn off XT2 osc
  
--- 203,206 ----
***************
*** 220,225 ****
      call Leds.yellowOn();
      TOSH_uwait(50000UL);
!     atomic SET_FLAG(BCSCTL2, SELM_2);
!     
      call Leds.yellowOff();
  
--- 218,227 ----
      call Leds.yellowOn();
      TOSH_uwait(50000UL);
! 
!     atomic{ 
!       BCSCTL2 = 0; 
!       SET_FLAG(BCSCTL2, SELM_2); /* select master clock source, XT2CLK when XT2 oscillator present */
!     }                            /*on-chip. LFXT1CLK when XT2 oscillator not present on-chip. */
! 
      call Leds.yellowOff();
  
***************
*** 251,254 ****
--- 253,260 ----
  
      call BTStdControl.init();
+     call Bluetooth.disableRemoteConfig(TRUE);
+      /* if CPU=8Mhz then customise roving networks baudrate to suit 8Mhz/9 baud */
+     call Bluetooth.setBaudrate("452");
+ 
      dma_blocks = 0;
      return SUCCESS;
***************
*** 531,534 ****
--- 537,541 ----
  
    event result_t SampleTimer.fired() {
+     call DMA0.beginTransfer();
      call DMA0.ADCbeginConversion();
      return SUCCESS;



More information about the Tinyos-contrib-commits mailing list