[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/msp430/Adc12
TestAdcMultiC.nc, 1.1, 1.2 TestAdcSingleC.nc, 1.1, 1.2
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Mon Apr 7 02:41:58 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html tep113.html,1.11,1.12
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/adc12
AdcStreamP.nc, NONE, 1.1 Msp430Adc12DMAWireC.nc, NONE,
1.1 WireAdcStreamP.nc, NONE, 1.1 AdcP.nc, 1.4,
1.5 AdcReadStreamClientC.nc, 1.4, 1.5 HplAdc12P.nc, 1.4,
1.5 Msp430Adc12ClientAutoDMAC.nc, 1.5,
1.6 Msp430Adc12ClientAutoDMA_RVGC.nc, 1.6,
1.7 Msp430Adc12ClientAutoRVGC.nc, 1.6, 1.7 Msp430Adc12ImplP.nc,
1.5, 1.6 Msp430Adc12MultiChannel.nc, 1.2, 1.3 README.txt, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/msp430/Adc12
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23244/apps/tests/msp430/Adc12
Modified Files:
TestAdcMultiC.nc TestAdcSingleC.nc
Log Message:
- bugfix: ReadStream did not work with a "usPeriod" parameter > 0xFFFF (the fix uses/adapts the atmel ReadStream code)
- bugfix: overflow interrupts were not handled/signalled correctly from the HAL
- fixed the wiring for DMA, which was not correct when used by more than one client
- polished the HPL and added some comments
- introduced a compile time warning when DMA/TimerA is accessed (will be removed once we decide how these components are arbitrated)
Index: TestAdcMultiC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/msp430/Adc12/TestAdcMultiC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestAdcMultiC.nc 25 Jun 2007 15:43:37 -0000 1.1
--- TestAdcMultiC.nc 7 Apr 2008 09:41:55 -0000 1.2
***************
*** 69,73 ****
const msp430adc12_channel_config_t config = {inch, sref, ref2_5v, adc12ssel, adc12div, sht, sampcon_ssel, sampcon_id};
adc12memctl_t memCtl = {inch2, sref2};
! uint8_t state;
uint16_t buffer[BUFFER_SIZE];
void task getData();
--- 69,73 ----
const msp430adc12_channel_config_t config = {inch, sref, ref2_5v, adc12ssel, adc12div, sht, sampcon_ssel, sampcon_id};
adc12memctl_t memCtl = {inch2, sref2};
! norace uint8_t state;
uint16_t buffer[BUFFER_SIZE];
void task getData();
***************
*** 86,89 ****
--- 86,91 ----
{
uint16_t i;
+ if (num != BUFFER_SIZE)
+ post signalFailure();
for (i=0; i<num; i++)
if (!data[i] || data[i] >= 0xFFF){
***************
*** 118,123 ****
async event void MultiChannel.dataReady(uint16_t *buf, uint16_t numSamples)
{
! if (assertData(buf, numSamples))
post signalSuccess();
call Resource.release();
}
--- 120,127 ----
async event void MultiChannel.dataReady(uint16_t *buf, uint16_t numSamples)
{
! if (assertData(buf, numSamples) && state++ == 0)
post signalSuccess();
+ else
+ post signalFailure();
call Resource.release();
}
Index: TestAdcSingleC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/msp430/Adc12/TestAdcSingleC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestAdcSingleC.nc 25 Jun 2007 15:43:37 -0000 1.1
--- TestAdcSingleC.nc 7 Apr 2008 09:41:55 -0000 1.2
***************
*** 65,68 ****
--- 65,69 ----
const msp430adc12_channel_config_t config = {inch, sref, ref2_5v, adc12ssel, adc12div, sht, sampcon_ssel, sampcon_id};
uint8_t state;
+ norace uint8_t numDone;
uint16_t buffer[BUFFER_SIZE];
void task getData();
***************
*** 118,122 ****
break;
default: call Resource.release();
! signal Notify.notify(TRUE);
break;
}
--- 119,124 ----
break;
default: call Resource.release();
! if (numDone == state)
! signal Notify.notify(TRUE);
break;
}
***************
*** 125,128 ****
--- 127,131 ----
async event error_t SingleChannel.singleDataReady(uint16_t data)
{
+ numDone++;
assertData(&data, 1);
call Resource.release();
***************
*** 134,137 ****
--- 137,141 ----
async event uint16_t* SingleChannel.multipleDataReady(uint16_t *buf, uint16_t length)
{
+ numDone++;
assertData(buf, length);
call Resource.release();
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html tep113.html,1.11,1.12
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/adc12
AdcStreamP.nc, NONE, 1.1 Msp430Adc12DMAWireC.nc, NONE,
1.1 WireAdcStreamP.nc, NONE, 1.1 AdcP.nc, 1.4,
1.5 AdcReadStreamClientC.nc, 1.4, 1.5 HplAdc12P.nc, 1.4,
1.5 Msp430Adc12ClientAutoDMAC.nc, 1.5,
1.6 Msp430Adc12ClientAutoDMA_RVGC.nc, 1.6,
1.7 Msp430Adc12ClientAutoRVGC.nc, 1.6, 1.7 Msp430Adc12ImplP.nc,
1.5, 1.6 Msp430Adc12MultiChannel.nc, 1.2, 1.3 README.txt, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list