[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/handhelds/tos/platform/msp430_crl_base
DMA_M.nc, 1.2, 1.3
steve ayer
ayer1 at users.sourceforge.net
Thu Sep 7 11:36:09 PDT 2006
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/handhelds/tos/lib/MMA7260_Accel
MMA7260_AccelM.nc, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/handhelds/tos/interfaces
MMA7260_Accel.h, NONE, 1.1 MMA7260_Accel.nc, NONE, 1.1 DMA.nc,
1.2, 1.3 IDChip.nc, 1.1, 1.2 IEEE802154.h, 1.2, 1.3 Leds.nc,
1.1, 1.2 Message.h, 1.1, 1.2 SD.nc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/msp430_crl_base
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32673/tos/platform/msp430_crl_base
Modified Files:
DMA_M.nc
Log Message:
added mma7260 accelerometer interface/lib
updated shimmer hardware.h adding adc6&7 pins
added hwtest for shimmer gyro board to hwtest; two versions, one three
channel, one six channel
updated interfaces for above and dma.adcinterrupt event now provides
register number
Index: DMA_M.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/msp430_crl_base/DMA_M.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DMA_M.nc 3 Aug 2006 19:16:50 -0000 1.2
--- DMA_M.nc 7 Sep 2006 18:36:07 -0000 1.3
***************
*** 71,79 ****
ADC12CTL0 |= MSC; // multiple conversions without more triggers
ADC12CTL1 = SHS_0 + SHP + CONSEQ_2; // s&h from adc12sc bit; sample from sampling timer; repeat single-channel conversion
ADC12CTL1 |= ADC12SSEL_3; // clk from smclk
ADC12MCTL0 |= INCH_0; // use input channel 1 for all mem regs
! ADC12MCTL0 |= SREF_0; // Vref = Vref+ and Vr-
}
}
--- 71,84 ----
ADC12CTL0 |= MSC; // multiple conversions without more triggers
+ CLR_FLAG(ADC12CTL0, SHT0_15); //clear sample and hold time bits
+ CLR_FLAG(ADC12CTL0, SHT1_15);
ADC12CTL1 = SHS_0 + SHP + CONSEQ_2; // s&h from adc12sc bit; sample from sampling timer; repeat single-channel conversion
ADC12CTL1 |= ADC12SSEL_3; // clk from smclk
ADC12MCTL0 |= INCH_0; // use input channel 1 for all mem regs
!
! ADC12MCTL0 |= SREF_1; // Vref = Vref+ and avss-
! ADC12MCTL1 |= SREF_1; // Vref = Vref+ and avss-
! ADC12MCTL2 |= SREF_1; // Vref = Vref+ and avss-
}
}
***************
*** 118,121 ****
--- 123,127 ----
// repeat single transfer (no ie reset), increment dest addr, static src addr
DMA0CTL = DMADT_4 + DMADSTINCR_3 + DMASRCINCR_0;
+
}
break;
***************
*** 127,130 ****
--- 133,137 ----
DMACTL0 |= DMA1TSEL_3 << 1; // trigger from ADC12IFGx
+
DMA1CTL = DMADT_4 + DMADSTINCR_3 + DMASRCINCR_0;
}
***************
*** 137,140 ****
--- 144,148 ----
DMACTL0 |= DMA2TSEL_3 << 1;
+
DMA2CTL = DMADT_4 + DMADSTINCR_3 + DMASRCINCR_0;
}
***************
*** 300,305 ****
async default event void DMA.transferComplete[uint8_t id](){}
!
!
TOSH_SIGNAL(DACDMA_VECTOR) {
volatile int v = DMA0CTL;
--- 308,335 ----
async default event void DMA.transferComplete[uint8_t id](){}
! /*
! TOSH_SIGNAL(DACDMA_VECTOR) {
! volatile uint16_t v = DMA2CTL;
!
! if(v & DMAIFG) {
! DMA2CTL &= ~DMAIFG;
! signal DMA.transferComplete[2]();
! }
! else{
! v = DMA1CTL;
! if(v & DMAIFG) {
! DMA1CTL &= ~DMAIFG;
! signal DMA.transferComplete[1]();
! }
! else{
! v = DMA0CTL;
! if(v & DMAIFG) {
! DMA0CTL &= ~DMAIFG;
! signal DMA.transferComplete[0]();
! }
! }
! }
! }
! */
TOSH_SIGNAL(DACDMA_VECTOR) {
volatile int v = DMA0CTL;
***************
*** 321,326 ****
}
!
! async default event void DMA.ADCInterrupt[uint8_t id]() {} ;
TOSH_SIGNAL(ADC_VECTOR) {
volatile uint16_t vec = ADC12IV;
--- 351,355 ----
}
! async default event void DMA.ADCInterrupt[uint8_t id](uint8_t regnum) {} ;
TOSH_SIGNAL(ADC_VECTOR) {
volatile uint16_t vec = ADC12IV;
***************
*** 328,335 ****
if( vec ) {
vec = vec >> 1;
!
if( vec >= 3 )
! signal DMA.ADCInterrupt[0]();
!
}
}
--- 357,377 ----
if( vec ) {
vec = vec >> 1;
! /* original generic trigger
if( vec >= 3 )
! signal DMA.ADCInterrupt[0](vec);
! */
! switch (vec) {
! case 6:
! signal DMA.ADCInterrupt[0](vec);
! break;
! case 7:
! signal DMA.ADCInterrupt[1](vec);
! break;
! case 8:
! signal DMA.ADCInterrupt[2](vec);
! break;
! default:
! break;
! }
}
}
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/handhelds/tos/lib/MMA7260_Accel
MMA7260_AccelM.nc, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/handhelds/tos/interfaces
MMA7260_Accel.h, NONE, 1.1 MMA7260_Accel.nc, NONE, 1.1 DMA.nc,
1.2, 1.3 IDChip.nc, 1.1, 1.2 IEEE802154.h, 1.2, 1.3 Leds.nc,
1.1, 1.2 Message.h, 1.1, 1.2 SD.nc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list