From e952f93bbaa9a3a3c0fa494302e99b012639b3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gon=C3=A7alves?= Date: Mon, 18 Jun 2012 11:19:26 +0100 Subject: [PATCH] Renamed platform to moteist5 Remove tests directory --- .../{MoteISTx5.target => moteist5.target} | 4 +- .../MultipleNoRepeat-mean/FastADCAppC.nc | 60 ---- .../MultipleNoRepeat-mean/FastADCC.nc | 204 ------------ .../MultipleNoRepeat-mean/Makefile | 2 - .../MultipleNoRepeat/ConfigureAdc.nc | 47 --- .../MultipleNoRepeat/FastADCAppC.nc | 59 ---- .../MultiChannel/MultipleNoRepeat/FastADCC.nc | 219 ------------- .../MultiChannel/MultipleNoRepeat/Makefile | 7 - .../MultipleNoRepeat/adc_configuration.h | 2 - .../MultipleRepeat/FastADCAppC.nc | 60 ---- .../SingleChannel/MultipleRepeat/FastADCC.nc | 178 ---------- .../SingleChannel/MultipleRepeat/Makefile | 7 - .../MultipleRepeat-mean/AdcTestSamplesOutput | 244 -------------- .../MultipleRepeat-mean/FastADCAppC.nc | 60 ---- .../MultipleRepeat-mean/FastADCC.nc | 223 ------------- .../MultipleRepeat-mean/Makefile | 7 - .../readings/adcCurrent1MHz.csv | Bin 6801 -> 0 bytes .../readings/adcCurrent1MHzVREFneg.csv | Bin 6801 -> 0 bytes .../readings/adcErrorBAT.csv | Bin 6166 -> 0 bytes .../readings/adcErrorFET-VREFneg.csv | Bin 1 -> 0 bytes .../readings/adcErrorFET.csv | Bin 6164 -> 0 bytes .../readings/adcErrorVREFneg.csv | Bin 6164 -> 0 bytes .../SingleChannel/SingleRepeat/FastADCAppC.nc | 60 ---- .../SingleChannel/SingleRepeat/FastADCC.nc | 153 --------- .../SingleChannel/SingleRepeat/Makefile | 7 - .../MoteISTx5/tests/DVSTest/Micaz/Makefile | 2 - .../tests/DVSTest/Micaz/MicaTaskC.nc | 26 -- .../tests/DVSTest/Micaz/MicaTaskP.nc | 156 --------- .../MoteISTx5/tests/DVSTest/RadioAdc/Makefile | 2 - .../MoteISTx5/tests/DVSTest/RadioAdc/Radio.h | 43 --- .../tests/DVSTest/RadioAdc/RadioAdcC.nc | 44 --- .../tests/DVSTest/RadioAdc/RadioAdcP.nc | 308 ------------------ .../RadioConstFrequencyNoAdc/DVSTestAppC.nc | 35 -- .../RadioConstFrequencyNoAdc/DVSTestP.nc | 140 -------- .../DVSTest/RadioConstFrequencyNoAdc/Makefile | 2 - .../RadioConstFrequencyNoAdc/Micaz/Makefile | 2 - .../Micaz/MicaTaskC.nc | 26 -- .../Micaz/MicaTaskP.nc | 127 -------- .../DVSTest/RadioConstFrequencyNoAdc/Radio.h | 42 --- .../RadioConstFrequencyNoAdc/Tasks/Tasks.nc | 24 -- .../RadioConstFrequencyNoAdc/Tasks/TasksC.nc | 11 - .../RadioConstFrequencyNoAdc/Tasks/TasksP.nc | 75 ----- .../Tasks/fibonacci/fib | Bin 7253 -> 0 bytes .../Tasks/fibonacci/fibonacci.c | 69 ---- .../RadioConstFrequencyNoAdc/Tasks/pi/pi | Bin 7272 -> 0 bytes .../RadioConstFrequencyNoAdc/Tasks/pi/pi.c | 9 - .../tests/DVSTest/RadioNoAdc/DVSTestAppC.nc | 39 --- .../tests/DVSTest/RadioNoAdc/DVSTestP.nc | 180 ---------- .../tests/DVSTest/RadioNoAdc/Makefile | 2 - .../MoteISTx5/tests/DVSTest/Tasks/Tasks.nc | 24 -- .../MoteISTx5/tests/DVSTest/Tasks/TasksC.nc | 11 - .../MoteISTx5/tests/DVSTest/Tasks/TasksP.nc | 81 ----- .../tests/DVSTest/Tasks/fibonacci/fib | Bin 7253 -> 0 bytes .../tests/DVSTest/Tasks/fibonacci/fibonacci.c | 69 ---- .../MoteISTx5/tests/DVSTest/Tasks/pi/pi | Bin 7272 -> 0 bytes .../MoteISTx5/tests/DVSTest/Tasks/pi/pi.c | 9 - .../DVSTest/noRadio/2Channels/DVSnoRadioC.nc | 32 -- .../DVSTest/noRadio/2Channels/DVSnoRadioP.nc | 203 ------------ .../tests/DVSTest/noRadio/2Channels/Makefile | 2 - .../tests/DVSTest/noRadio/2Channels/test.txt | 165 ---------- .../DVSTest/noRadio/3Channels/DVSnoRadioC.nc | 37 --- .../DVSTest/noRadio/3Channels/DVSnoRadioP.nc | 257 --------------- .../tests/DVSTest/noRadio/3Channels/Makefile | 2 - .../noRadio/FibonacciTest/DVSnoRadioC.nc | 32 -- .../noRadio/FibonacciTest/DVSnoRadioP.nc | 237 -------------- .../DVSTest/noRadio/FibonacciTest/Makefile | 2 - .../noRadio/FibonacciTest/messagetypes.h | 11 - .../tests/DVSTest/noRadio/old/ConfigureAdc.nc | 47 --- .../tests/DVSTest/noRadio/old/DVSnoRadioP2.nc | 238 -------------- .../tests/DVSTest/noRadio/old/messagetypes.h | 11 - .../MoteISTx5/tests/FlashTest/ClientC.nc | 12 - .../MoteISTx5/tests/FlashTest/ClientP.nc | 50 --- .../tests/FlashTest/FlashTestAppC.nc | 29 -- .../MoteISTx5/tests/FlashTest/FlashTestP.nc | 86 ----- .../MoteISTx5/tests/FlashTest/Makefile | 3 - .../tests/FrequencyTest/ClockTestAppC.nc | 25 -- .../tests/FrequencyTest/ClockTestP.nc | 69 ---- .../MoteISTx5/tests/FrequencyTest/Makefile | 3 - .../tests/RadioTest/MoteISTx5/BlinkToRadio.h | 22 -- .../RadioTest/MoteISTx5/BlinkToRadioAppC.nc | 72 ---- .../RadioTest/MoteISTx5/BlinkToRadioC.nc | 134 -------- .../tests/RadioTest/MoteISTx5/Makefile | 3 - .../tests/RadioTest/micaz/BlinkToRadio.h | 22 -- .../tests/RadioTest/micaz/BlinkToRadioAppC.nc | 72 ---- .../tests/RadioTest/micaz/BlinkToRadioC.nc | 131 -------- .../MoteISTx5/tests/RadioTest/micaz/Makefile | 3 - .../MoteISTx5/tests/TimerTest/Makefile | 3 - .../MoteISTx5/tests/TimerTest/TimerTestC.nc | 17 - .../MoteISTx5/tests/TimerTest/TimerTestP.nc | 39 --- .../adc-error/1.188V-error.csv | Bin 6091 -> 0 bytes .../adc-error/2.137V-error.csv | Bin 7365 -> 0 bytes .../adc-error/2.435V-error.csv | Bin 7183 -> 0 bytes .../adc-error/297.7mV-error.csv | Bin 9969 -> 0 bytes .../current-readings/adc-error/gnd-error.csv | Bin 7001 -> 0 bytes .../AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv | Bin 1326 -> 0 bytes ...autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv | Bin 1329 -> 0 bytes .../autopmm-1MHz_25MHz-5000it-2_7V.csv | Bin 1327 -> 0 bytes .../AutoPMM/autopmm-1MHz_25MHz-5000it.csv | Bin 1327 -> 0 bytes .../AutoPMM/autopmm-25MHz_1MHz-5000it-2.csv | Bin 1304 -> 0 bytes .../AutoPMM/autopmm-25MHz_1MHz-5000it.csv | Bin 1304 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv | Bin 1277 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-1800it.csv | Bin 1278 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-5000it-2.csv | Bin 1457 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-5000it.csv | Bin 1304 -> 0 bytes .../tests/current-readings/radio/radioON1.csv | Bin 9012 -> 0 bytes .../MoteISTx5/tests/printf-test/Makefile | 3 - .../MoteISTx5/tests/printf-test/PrintfAppC.nc | 19 -- .../MoteISTx5/tests/printf-test/PrintfP.nc | 67 ---- .../MultipleNoRepeat-mean/FastADCAppC.nc | 60 ---- .../MultipleNoRepeat-mean/FastADCC.nc | 204 ------------ .../MultipleNoRepeat-mean/Makefile | 2 - .../MultipleNoRepeat/ConfigureAdc.nc | 47 --- .../MultipleNoRepeat/FastADCAppC.nc | 59 ---- .../MultiChannel/MultipleNoRepeat/FastADCC.nc | 219 ------------- .../MultiChannel/MultipleNoRepeat/Makefile | 7 - .../MultipleNoRepeat/adc_configuration.h | 2 - .../MultipleRepeat/FastADCAppC.nc | 60 ---- .../SingleChannel/MultipleRepeat/FastADCC.nc | 178 ---------- .../SingleChannel/MultipleRepeat/Makefile | 7 - .../MultipleRepeat-mean/AdcTestSamplesOutput | 244 -------------- .../MultipleRepeat-mean/FastADCAppC.nc | 60 ---- .../MultipleRepeat-mean/FastADCC.nc | 223 ------------- .../MultipleRepeat-mean/Makefile | 7 - .../readings/adcCurrent1MHz.csv | Bin 6801 -> 0 bytes .../readings/adcCurrent1MHzVREFneg.csv | Bin 6801 -> 0 bytes .../readings/adcErrorBAT.csv | Bin 6166 -> 0 bytes .../readings/adcErrorFET-VREFneg.csv | Bin 1 -> 0 bytes .../readings/adcErrorFET.csv | Bin 6164 -> 0 bytes .../readings/adcErrorVREFneg.csv | Bin 6164 -> 0 bytes .../SingleChannel/SingleRepeat/FastADCAppC.nc | 60 ---- .../SingleChannel/SingleRepeat/FastADCC.nc | 153 --------- .../SingleChannel/SingleRepeat/Makefile | 7 - .../tests/tests/DVSTest/Micaz/Makefile | 2 - .../tests/tests/DVSTest/Micaz/MicaTaskC.nc | 26 -- .../tests/tests/DVSTest/Micaz/MicaTaskP.nc | 156 --------- .../tests/tests/DVSTest/RadioAdc/Makefile | 2 - .../tests/tests/DVSTest/RadioAdc/Radio.h | 43 --- .../tests/tests/DVSTest/RadioAdc/RadioAdcC.nc | 44 --- .../tests/tests/DVSTest/RadioAdc/RadioAdcP.nc | 308 ------------------ .../RadioConstFrequencyNoAdc/DVSTestAppC.nc | 35 -- .../RadioConstFrequencyNoAdc/DVSTestP.nc | 140 -------- .../DVSTest/RadioConstFrequencyNoAdc/Makefile | 2 - .../RadioConstFrequencyNoAdc/Micaz/Makefile | 2 - .../Micaz/MicaTaskC.nc | 26 -- .../Micaz/MicaTaskP.nc | 127 -------- .../DVSTest/RadioConstFrequencyNoAdc/Radio.h | 42 --- .../RadioConstFrequencyNoAdc/Tasks/Tasks.nc | 24 -- .../RadioConstFrequencyNoAdc/Tasks/TasksC.nc | 11 - .../RadioConstFrequencyNoAdc/Tasks/TasksP.nc | 75 ----- .../Tasks/fibonacci/fib | Bin 7253 -> 0 bytes .../Tasks/fibonacci/fibonacci.c | 69 ---- .../RadioConstFrequencyNoAdc/Tasks/pi/pi | Bin 7272 -> 0 bytes .../RadioConstFrequencyNoAdc/Tasks/pi/pi.c | 9 - .../tests/DVSTest/RadioNoAdc/DVSTestAppC.nc | 39 --- .../tests/DVSTest/RadioNoAdc/DVSTestP.nc | 180 ---------- .../tests/tests/DVSTest/RadioNoAdc/Makefile | 2 - .../tests/tests/DVSTest/Tasks/Tasks.nc | 24 -- .../tests/tests/DVSTest/Tasks/TasksC.nc | 11 - .../tests/tests/DVSTest/Tasks/TasksP.nc | 81 ----- .../tests/tests/DVSTest/Tasks/fibonacci/fib | Bin 7253 -> 0 bytes .../tests/DVSTest/Tasks/fibonacci/fibonacci.c | 69 ---- .../MoteISTx5/tests/tests/DVSTest/Tasks/pi/pi | Bin 7272 -> 0 bytes .../tests/tests/DVSTest/Tasks/pi/pi.c | 9 - .../DVSTest/noRadio/2Channels/DVSnoRadioC.nc | 32 -- .../DVSTest/noRadio/2Channels/DVSnoRadioP.nc | 203 ------------ .../tests/DVSTest/noRadio/2Channels/Makefile | 2 - .../tests/DVSTest/noRadio/2Channels/test.txt | 165 ---------- .../DVSTest/noRadio/3Channels/DVSnoRadioC.nc | 37 --- .../DVSTest/noRadio/3Channels/DVSnoRadioP.nc | 257 --------------- .../tests/DVSTest/noRadio/3Channels/Makefile | 2 - .../noRadio/FibonacciTest/DVSnoRadioC.nc | 32 -- .../noRadio/FibonacciTest/DVSnoRadioP.nc | 237 -------------- .../DVSTest/noRadio/FibonacciTest/Makefile | 2 - .../noRadio/FibonacciTest/messagetypes.h | 11 - .../tests/DVSTest/noRadio/old/ConfigureAdc.nc | 47 --- .../tests/DVSTest/noRadio/old/DVSnoRadioP2.nc | 238 -------------- .../tests/DVSTest/noRadio/old/messagetypes.h | 11 - .../tests/tests/FlashTest/ClientC.nc | 12 - .../tests/tests/FlashTest/ClientP.nc | 50 --- .../tests/tests/FlashTest/FlashTestAppC.nc | 29 -- .../tests/tests/FlashTest/FlashTestP.nc | 86 ----- .../MoteISTx5/tests/tests/FlashTest/Makefile | 3 - .../tests/FrequencyTest/ClockTestAppC.nc | 25 -- .../tests/tests/FrequencyTest/ClockTestP.nc | 69 ---- .../tests/tests/FrequencyTest/Makefile | 3 - .../tests/RadioTest/MoteISTx5/BlinkToRadio.h | 22 -- .../RadioTest/MoteISTx5/BlinkToRadioAppC.nc | 72 ---- .../RadioTest/MoteISTx5/BlinkToRadioC.nc | 134 -------- .../tests/tests/RadioTest/MoteISTx5/Makefile | 3 - .../tests/RadioTest/micaz/BlinkToRadio.h | 22 -- .../tests/RadioTest/micaz/BlinkToRadioAppC.nc | 72 ---- .../tests/RadioTest/micaz/BlinkToRadioC.nc | 131 -------- .../tests/tests/RadioTest/micaz/Makefile | 3 - .../MoteISTx5/tests/tests/TimerTest/Makefile | 3 - .../tests/tests/TimerTest/TimerTestC.nc | 17 - .../tests/tests/TimerTest/TimerTestP.nc | 39 --- .../adc-error/1.188V-error.csv | Bin 6091 -> 0 bytes .../adc-error/2.137V-error.csv | Bin 7365 -> 0 bytes .../adc-error/2.435V-error.csv | Bin 7183 -> 0 bytes .../adc-error/297.7mV-error.csv | Bin 9969 -> 0 bytes .../current-readings/adc-error/gnd-error.csv | Bin 7001 -> 0 bytes .../AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv | Bin 1326 -> 0 bytes ...autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv | Bin 1329 -> 0 bytes .../autopmm-1MHz_25MHz-5000it-2_7V.csv | Bin 1327 -> 0 bytes .../AutoPMM/autopmm-1MHz_25MHz-5000it.csv | Bin 1327 -> 0 bytes .../AutoPMM/autopmm-25MHz_1MHz-5000it-2.csv | Bin 1304 -> 0 bytes .../AutoPMM/autopmm-25MHz_1MHz-5000it.csv | Bin 1304 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv | Bin 1277 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-1800it.csv | Bin 1278 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-5000it-2.csv | Bin 1457 -> 0 bytes .../PMM_1_9V/pmm1.9-25MHz_1MHz-5000it.csv | Bin 1304 -> 0 bytes .../tests/current-readings/radio/radioON1.csv | Bin 9012 -> 0 bytes .../tests/tests/printf-test/Makefile | 3 - .../tests/tests/printf-test/PrintfAppC.nc | 19 -- .../tests/tests/printf-test/PrintfP.nc | 67 ---- .../{MoteISTx5 => moteist5}/.platform | 0 .../{MoteISTx5 => moteist5}/ActiveMessageC.nc | 0 .../Ieee154MessageC.nc | 0 .../LocalIeeeEui64C.nc | 0 .../{MoteISTx5 => moteist5}/PlatformC.nc | 0 .../{MoteISTx5 => moteist5}/PlatformP.nc | 0 .../chips/adg715/ADG715C.nc | 0 .../chips/adg715/ADG715P.nc | 0 .../chips/cc2420/HplCC2420AlarmC.nc | 0 .../chips/cc2420/HplCC2420InterruptsC.nc | 0 .../chips/cc2420/HplCC2420PinsC.nc | 0 .../chips/cc2420/HplCC2420SpiC.nc | 0 .../{MoteISTx5 => moteist5}/hardware.h | 0 .../hardware/adc/DemoSensorC.nc | 0 .../hardware/adc/DemoSensorNowC.nc | 0 .../hardware/adc/DemoSensorStreamC.nc | 0 .../hardware/adc/PlatformAdcC.nc | 0 .../hardware/adc/VoltageC.nc | 0 .../hardware/buttons/HplUserButtonC.nc | 0 .../hardware/buttons/SwitchToggleC.nc | 0 .../hardware/buttons/UserButton.h | 0 .../hardware/buttons/UserButtonC.nc | 0 .../hardware/buttons/UserButtonP.nc | 0 .../hardware/clock/FreqControl.nc | 0 .../hardware/clock/Msp430FreqControlC.nc | 0 .../hardware/clock/Msp430FreqControlP.nc | 0 .../hardware/clock/Msp430XV2ClockControlP.nc | 0 .../hardware/clock/PlatformClockC.nc | 0 .../hardware/clock/PlatformClockP.nc | 0 .../hardware/clock/freq_control_const.h | 0 .../hardware/leds/LedsC.nc | 0 .../hardware/leds/LedsP.nc | 0 .../hardware/leds/PlatformLedsC.nc | 0 .../hardware/leds/PlatformLedsP.nc | 0 .../hardware/pins/PlatformPinsC.nc | 0 .../hardware/pins/PlatformPinsP.nc | 0 .../hardware/pmm/Msp430PmmC.nc | 0 .../hardware/pmm/Msp430PmmP.nc | 0 .../hardware/pmm/Pmm.nc | 0 .../hardware/usci/PlatformI2CC.nc | 0 .../hardware/usci/PlatformI2CP.nc | 0 .../hardware/usci/PlatformSerialC.nc | 0 .../hardware/usci/PlatformSerialP.nc | 0 .../hardware/usci/PlatformSpiC.nc | 0 .../hardware/usci/PlatformSpiP.nc | 0 .../hardware/usci/PlatformUsciMapC.nc | 0 .../hardware/usci/msp430usci.h | 0 .../{MoteISTx5 => moteist5}/platform.h | 0 .../platform_message.h | 0 264 files changed, 2 insertions(+), 10636 deletions(-) rename support/make/{MoteISTx5.target => moteist5.target} (69%) delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHzVREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorBAT.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorFET-VREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorFET.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Radio.h delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc delete mode 100755 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c delete mode 100755 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/pi/pi delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/pi/pi.c delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/Tasks.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksP.nc delete mode 100755 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fib delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fibonacci.c delete mode 100755 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/pi/pi delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/Tasks/pi/pi.c delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/test.txt delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/ConfigureAdc.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc delete mode 100644 tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/messagetypes.h delete mode 100644 tos/platforms/MoteISTx5/tests/FlashTest/ClientC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FlashTest/ClientP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FlashTest/FlashTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FlashTest/FlashTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FlashTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/FrequencyTest/ClockTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FrequencyTest/ClockTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/FrequencyTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadio.h delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadio.h delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/RadioTest/micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/TimerTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/TimerTest/TimerTestC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/TimerTest/TimerTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/adc-error/1.188V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.137V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.435V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/adc-error/297.7mV-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/adc-error/gnd-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/current-readings/radio/radioON1.csv delete mode 100644 tos/platforms/MoteISTx5/tests/printf-test/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/printf-test/PrintfAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/printf-test/PrintfP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHzVREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorBAT.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorFET-VREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorFET.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Radio.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc delete mode 100755 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c delete mode 100755 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/pi/pi delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/pi/pi.c delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/Tasks.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksP.nc delete mode 100755 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fib delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fibonacci.c delete mode 100755 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/pi/pi delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/pi/pi.c delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/test.txt delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/ConfigureAdc.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/messagetypes.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FlashTest/FlashTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FlashTest/FlashTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FlashTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FrequencyTest/ClockTestAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FrequencyTest/ClockTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/FrequencyTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadio.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadio.h delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/TimerTest/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestP.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/1.188V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.137V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.435V-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/297.7mV-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/gnd-error.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-5000it-2.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-5000it.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/current-readings/radio/radioON1.csv delete mode 100644 tos/platforms/MoteISTx5/tests/tests/printf-test/Makefile delete mode 100644 tos/platforms/MoteISTx5/tests/tests/printf-test/PrintfAppC.nc delete mode 100644 tos/platforms/MoteISTx5/tests/tests/printf-test/PrintfP.nc rename tos/platforms/{MoteISTx5 => moteist5}/.platform (100%) rename tos/platforms/{MoteISTx5 => moteist5}/ActiveMessageC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/Ieee154MessageC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/LocalIeeeEui64C.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/PlatformC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/PlatformP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/adg715/ADG715C.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/adg715/ADG715P.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/cc2420/HplCC2420AlarmC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/cc2420/HplCC2420InterruptsC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/cc2420/HplCC2420PinsC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/chips/cc2420/HplCC2420SpiC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware.h (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/adc/DemoSensorC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/adc/DemoSensorNowC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/adc/DemoSensorStreamC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/adc/PlatformAdcC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/adc/VoltageC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/buttons/HplUserButtonC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/buttons/SwitchToggleC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/buttons/UserButton.h (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/buttons/UserButtonC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/buttons/UserButtonP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/FreqControl.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/Msp430FreqControlC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/Msp430FreqControlP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/Msp430XV2ClockControlP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/PlatformClockC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/PlatformClockP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/clock/freq_control_const.h (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/leds/LedsC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/leds/LedsP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/leds/PlatformLedsC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/leds/PlatformLedsP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/pins/PlatformPinsC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/pins/PlatformPinsP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/pmm/Msp430PmmC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/pmm/Msp430PmmP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/pmm/Pmm.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformI2CC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformI2CP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformSerialC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformSerialP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformSpiC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformSpiP.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/PlatformUsciMapC.nc (100%) rename tos/platforms/{MoteISTx5 => moteist5}/hardware/usci/msp430usci.h (100%) rename tos/platforms/{MoteISTx5 => moteist5}/platform.h (100%) rename tos/platforms/{MoteISTx5 => moteist5}/platform_message.h (100%) diff --git a/support/make/MoteISTx5.target b/support/make/moteist5.target similarity index 69% rename from support/make/MoteISTx5.target rename to support/make/moteist5.target index 2e58dabea..71ccc885e 100644 --- a/support/make/MoteISTx5.target +++ b/support/make/moteist5.target @@ -1,9 +1,9 @@ #-*-Makefile-*- vim:syntax=make -PLATFORM = MoteISTx5 +PLATFORM = moteist5 MSP_MCU = msp430f5438a $(call TOSMake_include_platform,msp) -MoteISTx5: $(BUILD_DEPS) +moteist5: $(BUILD_DEPS) @: diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc deleted file mode 100644 index 7ea1a1ef3..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultiple(); - - event void Boot.booted(){ - call Resource.request(); - } - - event void Resource.granted(){ - uint8_t i; - error_t e = FAIL; - while(e != SUCCESS){ - e = configureMultiple(); - } - - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - - for(i=0; i<5; i++){ - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - } - - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - printadb(); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.461; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - float Vsense = 0; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printf("Sample %d =", i); - //printfFloat((float) adb[i]); - //printf("\n"); - } - mean = mean/SAMPLES; - printf("Sample mean ="); - printfFloat(mean); - printf("\n"); - - printf("Vout mean (into ADC) ="); - Vout = mean*refVolt/Nmax; - printfFloat(Vout); - printf(" V\n"); - - Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - printf("Vsense ="); - printfFloat(Vsense); - printf(" mV\n"); - - Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - printf("Current ="); - printfFloat(Current); - printf(" mA\n"); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - printf("Current ="); - printfFloat(Current); - printf(" mA\n"); - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultiple(){ - error_t e; - printf("Configure multipleRepeat\n"); - e = call adc.configureMultiple(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile deleted file mode 100644 index d0904ef73..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=FastADCAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc deleted file mode 100644 index 28f536c25..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * This open source code was developed with funding from People Power Company - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include "Msp430Adc12.h" - -interface Msp430UsciConfigure { - /** - * Return a pointer to the configuration that should be used for the ADC - */ - async command const msp430adc12_channel_config_t* getConfiguration (); - - async command const adc12memctl_t* getAdditionalChannels (); -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc deleted file mode 100644 index 790561e6b..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc deleted file mode 100644 index 100ac4cc9..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * 2 Channels convertion - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 15 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource; -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_1024_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - /*adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - };*/ - adc12memctl_t channelconfig [] = { - {INPUT_CHANNEL_A2, REFVOLT_LEVEL_2_5, 0}, - {INPUT_CHANNEL_A3, REFVOLT_LEVEL_2_5, 1} - }; - adc12memctl_t * adcchannelconfig = (adc12memctl_t *) channelconfig; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configure(); - - event void Boot.booted(){ - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configure(); - } - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - /** - * Conversion results are ready. Results are stored in the buffer in the - * order the channels where specified in the configure() - * command, i.e. every (numMemctl+1)-th entry maps to the same channel. - * - * @param buffer Conversion results (lower 12 bit are valid, respectively). - * @param numSamples Number of results stored in buffer - */ - printadb(); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - //functions - - void printadb(){ - uint8_t i; - uint32_t VCurrentMean = 0; - uint32_t VCoreMean = 0; - uint32_t VbatMean = 0; - - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Rsense = 1.01; - float curr=0; - float bat =0; - float core=0; - - for(i = 0; i < SAMPLES; i++){ - printf("adb[%d] = %d ->", i, adb[i]); - core = (float)adb[i]*2.5/4095; - printfFloat(core); - } - uwait(1024*6); - /* - for(i = 0; i < SAMPLES; i+=3){ - VCurrentMean += adb[i]; - VbatMean += adb[i+1]; - VCoreMean += adb[i+2]; - } - VCurrentMean /= (SAMPLES/3); //bits - VCoreMean /= (SAMPLES/3); // bits - VbatMean /= (SAMPLES/3); // bits - curr = ((float)VCurrentMean)*2.5/Nmax); - curr /= (Gain*Rsense); - curr = curr *1000;//value in mA - - bat = (((float)VCoreMean)*2.5/Nmax)*2; //value in V - - core = ((float)VCoreMean)*1.5/Nmax; // in V - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - printf("Current,Supply,Vcore\n"); - printfFloat(curr); - printf(","); - printfFloat(bat); - printf(","); - printfFloat(core); - printf("\n"); - //printf("%d,%lu,%lu,%lu,%lu,%lu\n", Number, ActFreq, Time, VCurrentMean, VbatMean, VCoreMean); - */ - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configure(){ - error_t e; - e = call adc.configure(&adcconfig, adcchannelconfig, 2, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h b/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h deleted file mode 100644 index 94c62756e..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "Msp430Adc12.h" - diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc deleted file mode 100644 index 10c452b52..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_8_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultiple(); - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void Boot.booted(){ - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - printf("Resource Granted\n"); - while(e != SUCCESS){ - e = configureMultiple(); - } - printf("Starting 1st conversion\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - printf("Samples ready\n"); - printadb(); - uwait(4096); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void printadb(){ - uint16_t i; - float voltage = 0; - printf("Printing buffer\n"); - for(i = 0; i < SAMPLES; i++){ - printf("adb[%d] = %d ->", i, adb[i]); - voltage = adb[i]*2.5/4095; - printfFloat(voltage); - } - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d Volt\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultiple(){ - error_t e; - printf("Configure multipleRepeat\n"); - e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput deleted file mode 100644 index 741e49085..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput +++ /dev/null @@ -1,244 +0,0 @@ -Configure multipleRepeat -Starting the ADC... - -Printing ADC set of samples Nº0. -Sample 0 = 3830.000 -Sample 1 = 2989.000 -Sample 2 = 2546.000 -Sample 3 = 2283.000 -Sample 4 = 2114.000 -Sample 5 = 2010.000 -Sample 6 = 1929.000 -Sample 7 = 1875.000 -Sample 8 = 1839.000 -Sample 9 = 1812.000 -Sample 10 = 1805.000 -Sample 11 = 1786.000 -Sample 12 = 1781.000 -Sample 13 = 1769.000 -Sample 14 = 1776.000 -Sample 15 = 1761.000 -Sample mean = 2119.062 -Vout mean (into ADC) = 1.293 V -Vsense = 34.534 mV -Current = 34.192 mA - -Printing ADC set of samples Nº1. -Sample 0 = 1695.000 -Sample 1 = 1721.000 -Sample 2 = 1695.000 -Sample 3 = 1692.000 -Sample 4 = 1697.000 -Sample 5 = 1702.000 -Sample 6 = 1692.000 -Sample 7 = 1697.000 -Sample 8 = 1698.000 -Sample 9 = 1688.000 -Sample 10 = 1695.000 -Sample 11 = 1740.000 -Sample 12 = 1701.000 -Sample 13 = 1690.000 -Sample 14 = 1703.000 -Sample 15 = 1691.000 -Sample mean = 1699.812 -Vout mean (into ADC) = 1.037 V -Vsense = 27.701 mV -Current = 27.427 mA - -Printing ADC set of samples Nº2. -Sample 0 = 1836.000 -Sample 1 = 1832.000 -Sample 2 = 1836.000 -Sample 3 = 1835.000 -Sample 4 = 1830.000 -Sample 5 = 1834.000 -Sample 6 = 1836.000 -Sample 7 = 1826.000 -Sample 8 = 1834.000 -Sample 9 = 1836.000 -Sample 10 = 1839.000 -Sample 11 = 1849.000 -Sample 12 = 1834.000 -Sample 13 = 1850.000 -Sample 14 = 1832.000 -Sample 15 = 1835.000 -Sample mean = 1835.875 -Vout mean (into ADC) = 1.120 V -Vsense = 29.919 mV -Current = 29.622 mA - -Printing ADC set of samples Nº3. -Sample 0 = 1876.000 -Sample 1 = 1882.000 -Sample 2 = 1875.000 -Sample 3 = 1890.000 -Sample 4 = 1873.000 -Sample 5 = 1887.000 -Sample 6 = 1873.000 -Sample 7 = 1873.000 -Sample 8 = 1878.000 -Sample 9 = 1872.000 -Sample 10 = 1874.000 -Sample 11 = 1888.000 -Sample 12 = 1883.000 -Sample 13 = 1877.000 -Sample 14 = 1879.000 -Sample 15 = 1880.000 -Sample mean = 1878.750 -Vout mean (into ADC) = 1.146 V -Vsense = 30.617 mV -Current = 30.314 mA - -Printing ADC set of samples Nº4. -Sample 0 = 1909.000 -Sample 1 = 1904.000 -Sample 2 = 1907.000 -Sample 3 = 1905.000 -Sample 4 = 1906.000 -Sample 5 = 1900.000 -Sample 6 = 1909.000 -Sample 7 = 1898.000 -Sample 8 = 1910.000 -Sample 9 = 1909.000 -Sample 10 = 1911.000 -Sample 11 = 1910.000 -Sample 12 = 1908.000 -Sample 13 = 1905.000 -Sample 14 = 1908.000 -Sample 15 = 1910.000 -Sample mean = 1906.812 -Vout mean (into ADC) = 1.164 V -Vsense = 31.075 mV -Current = 30.767 mA - -Printing ADC set of samples Nº5. -Sample 0 = 1907.000 -Sample 1 = 1922.000 -Sample 2 = 1907.000 -Sample 3 = 1913.000 -Sample 4 = 1911.000 -Sample 5 = 1909.000 -Sample 6 = 1911.000 -Sample 7 = 1909.000 -Sample 8 = 1907.000 -Sample 9 = 1954.000 -Sample 10 = 1912.000 -Sample 11 = 1898.000 -Sample 12 = 1907.000 -Sample 13 = 1899.000 -Sample 14 = 1908.000 -Sample 15 = 1925.000 -Sample mean = 1912.437 -Vout mean (into ADC) = 1.167 V -Vsense = 31.166 mV -Current = 30.858 mA - -Printing ADC set of samples Nº6. -Sample 0 = 1903.000 -Sample 1 = 1905.000 -Sample 2 = 1908.000 -Sample 3 = 1906.000 -Sample 4 = 1903.000 -Sample 5 = 1906.000 -Sample 6 = 1909.000 -Sample 7 = 1904.000 -Sample 8 = 1903.000 -Sample 9 = 1902.000 -Sample 10 = 1905.000 -Sample 11 = 1896.000 -Sample 12 = 1914.000 -Sample 13 = 1894.000 -Sample 14 = 1905.000 -Sample 15 = 1900.000 -Sample mean = 1903.937 -Vout mean (into ADC) = 1.162 V -Vsense = 31.028 mV -Current = 30.721 mA - -Printing ADC set of samples Nº7. -Sample 0 = 1895.000 -Sample 1 = 1903.000 -Sample 2 = 1894.000 -Sample 3 = 1890.000 -Sample 4 = 1891.000 -Sample 5 = 1898.000 -Sample 6 = 1896.000 -Sample 7 = 1901.000 -Sample 8 = 1891.000 -Sample 9 = 1888.000 -Sample 10 = 1899.000 -Sample 11 = 1916.000 -Sample 12 = 1897.000 -Sample 13 = 1896.000 -Sample 14 = 1890.000 -Sample 15 = 1899.000 -Sample mean = 1896.500 -Vout mean (into ADC) = 1.157 V -Vsense = 30.907 mV -Current = 30.601 mA - -Printing ADC set of samples Nº8. -Sample 0 = 1887.000 -Sample 1 = 1886.000 -Sample 2 = 1885.000 -Sample 3 = 1881.000 -Sample 4 = 1885.000 -Sample 5 = 1892.000 -Sample 6 = 1886.000 -Sample 7 = 1907.000 -Sample 8 = 1889.000 -Sample 9 = 1898.000 -Sample 10 = 1889.000 -Sample 11 = 1886.000 -Sample 12 = 1889.000 -Sample 13 = 1898.000 -Sample 14 = 1880.000 -Sample 15 = 1883.000 -Sample mean = 1888.812 -Vout mean (into ADC) = 1.153 V -Vsense = 30.781 mV -Current = 30.477 mA - -Printing ADC set of samples Nº9. -Sample 0 = 1867.000 -Sample 1 = 1860.000 -Sample 2 = 1869.000 -Sample 3 = 1866.000 -Sample 4 = 1863.000 -Sample 5 = 1869.000 -Sample 6 = 1870.000 -Sample 7 = 1870.000 -Sample 8 = 1871.000 -Sample 9 = 1869.000 -Sample 10 = 1868.000 -Sample 11 = 1880.000 -Sample 12 = 1871.000 -Sample 13 = 1867.000 -Sample 14 = 1870.000 -Sample 15 = 1862.000 -Sample mean = 1868.250 -Vout mean (into ADC) = 1.140 V -Vsense = 30.446 mV -Current = 30.145 mA - -Printing ADC set of samples Nº9. -Sample 0 = 1867.000 -Sample 1 = 1860.000 -Sample 2 = 1869.000 -Sample 3 = 1866.000 -Sample 4 = 1863.000 -Sample 5 = 1869.000 -Sample 6 = 1870.000 -Sample 7 = 1870.000 -Sample 8 = 1871.000 -Sample 9 = 1869.000 -Sample 10 = 1868.000 -Sample 11 = 1880.000 -Sample 12 = 1871.000 -Sample 13 = 1867.000 -Sample 14 = 1870.000 -Sample 15 = 1862.000 -Sample mean = 1868.250 -Vout mean (into ADC) = 1.140 V -Vsense = 30.446 mV -Current = 30.145 mA diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc deleted file mode 100644 index e2217331f..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - uint8_t count = 0; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A2, - //sref: REFERENCE_VREFplus_VREFnegterm, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_8_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void uwait(uint32_t u); - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultipleRepeat(); - - event void Boot.booted(){ - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureMultipleRepeat(); - } - //printf("Starting the ADC...\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - //if(count<20){ - printadb(); - // count++; - // } - // else - // return NULL; - // uwait(1024*6); - call Leds.led2Toggle(); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - float Vsense = 0; - float Rsense = 1.01; - //printf("Sample,Vin(V)\n"); - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printfFloat((float) adb[i]); - //printf(","); - Vout = adb[i]*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf("\n"); - } - mean = mean/SAMPLES; - //printf("Sample mean ="); - //printfFloat(mean); - //printf("\n"); - // printf("Mean(V),Vsense(mV),Current(mA),Current(mA)\n"); - //printf("Vout corrected with \" ((float)((uint8_t)(Vout*100)))/100 \" = "); - Vout = mean*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printf("Mean Voltage: "); - printfFloat(Vout); - printf("\n"); - /* - Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - //printf("Vsense ="); - printfFloat(Vsense); - printf(","); - - Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - printfFloat(Current); - printf(","); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - printfFloat(Current); - //printf(" mA\n"); - //printf("\n"); - printf("\n");*/ - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2, f3; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - f3 = f*10000;f3 %= 10; - printf("%ld.%d%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2, (uint8_t) f3); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultipleRepeat(){ - error_t e; - //printf("Configure multipleRepeat\n"); - e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv deleted file mode 100644 index add09c2b9852a8eee9f5b4caca5bd7f0fc189b37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6801 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 diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv deleted file mode 100644 index cba180b4056262c846eb6e9706bde2e87fa8593f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6164 zcmb`LJ8#@D5QJ0fm)O7|;7hMENbM@X^)6Hdh!26C{QpQ?0lJSyCZytPc#B=`&W?r; z>C?C8m!ChD%k}&1;riH(pWXVqxOGUO+lJk8u8W7|rv{(Dn>fzJ#Iq&*0mcn7CnKMh z=dIDp^=-MmE!)4Zzh7UM+pmY0FZiEx`mj+EQ*Xm=g^r}L2iBv-NM(hiKOc(6k`7-; zvUe4!kPSzLICO2Cxp^Zi49Nz+4+UqeJ{|Sa)G5^D>`qy$B*~eIq>q+b0*qumT5X)| zIt!+=U^)w>&d3>iCo)FT*B@L*SExtLV}Hy^OJz~0+crYt{Zviz8Jwho2Ph)gMq z{ZWz3!u~jqKF*`XdGslk7}?0#lviW4wHa+~M$H-P)my3u#nQ*{qHs2H7B|k^oXK*t z9gedrbf!=%pTenpDyLF8nXlgq8ab<4n+m7uPx10GKBe7yUn6IE^Y^{&XT9xbeYrMO zb=5oPDR$5LSY16^YLN39IjhncD=1{DcQVMFsv|~n#i@D3sUjOWvopZwZ7p~^1AM8o z`M4$Y1W-I6n|Bl^x(_%F_?UN{v_)jN?fOTDG^!YpSQY}8rRWuqRMTAR$G^r^U3K60k? z$t;bWna=*PpRrpaQ#w2AV?Cua_D*Cx?p2mH&g^;-?f8uQXO8uQmimB3WbBU?ak4)~ zs+`QidGVO&=f3z_!cbMdkuw{ygmH^X7S^t diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc deleted file mode 100644 index a897ef06f..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void showerror(); - error_t configureSingleRepeat(); - void printfFloat(float toBePrinted); - - - event void Boot.booted(){ - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - printf("Resource Granted\n"); - while(e != SUCCESS){ - e = configureSingleRepeat(); - } - printf("Starting 1st conversion\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - async event error_t adc.singleDataReady(uint16_t data){ - float voltage = 0; - printf("Sample: %d\nVoltage: ", data); - voltage = data*2.5/4095; - printfFloat(voltage); - return SUCCESS; - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - } - -//functions - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureSingleRepeat(){ - error_t e; - printf("Configure singleRepeat\n"); - e = call adc.configureSingleRepeat(&adcconfig, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/Makefile b/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/AdcTest/SingleChannel/SingleRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/Makefile deleted file mode 100644 index 95184a0aa..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=MicaTaskC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskC.nc deleted file mode 100644 index da1aeb47d..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskC.nc +++ /dev/null @@ -1,26 +0,0 @@ -configuration MicaTaskC { -} -implementation { - components MainC; - components LedsC; - components MicaTaskP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskP.nc deleted file mode 100644 index e28f400cc..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Micaz/MicaTaskP.nc +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include "../RadioAdc/Radio.h" - -module MicaTaskP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - bool up = TRUE; - uint16_t missedDeadlines = 0; - uint16_t metDeadlines = 0; - uint16_t deadline = 100; //now using this one instead of the one in radio.h - uint16_t iterations = 100; //now using this one instead of the one in radio.h - uint16_t numRequest = 0; //serves as a counter for rasing or lowering the iteration number - uint16_t requestNum = 0;//count the number of requests so far - //prototypes - error_t MicaSendMsg(uint8_t state); - - event void Boot.booted() { - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer1.startPeriodic(PERIOD); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MoteISTMsg)) { - mist_m = (MoteISTMsg*)payload; - if(mist_m->nodeid == MOTEIST_NODE_ID){ - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return 0; - } - micaz_m->nodeid = MICA_NODE_ID; //assign Micaz ID - micaz_m->task_i = iterations; - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - - switch (mist_m->state){ - case REQUEST: // MoteIST ready for start - micaz_m->state = START; - break; - case STARTED: // MoteIST has started - call Timer0.startOneShot(deadline); - return msg; // At this point don't need to send msg to MoteIST, return - case DEADLINE_MET: - call Timer0.stop(); //stop timer, deadline is met - call Leds.led1Toggle(); - micaz_m->met = ++metDeadlines; - micaz_m->state = DEADLINE_MET; - break; - case DEADLINE_MISS: // MoteIST missed the deadline, too bad.. but nothing to do here - return msg; - default: - } - if(call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - - - event void Timer0.fired(){ //deadline Reached - missedDeadlines++; - call Leds.led0Toggle(); - MicaSendMsg(DEADLINE_MISS); - } - - event void Timer1.fired(){ //make new request - requestNum++; - MicaSendMsg(REQUEST); - numRequest++; - - if(numRequest>3){ - switch(up){ - case TRUE: - if(iterations < ITERATIONS) - iterations += 200; - else{ - up = FALSE; - return; - } - break; - case FALSE: - if(iterations > 200) - iterations -= 200; - else{ - call Timer1.stop(); - return; - } - break; - default: - } - numRequest=0; - } - } - - //functions - error_t MicaSendMsg(uint8_t state){ - - MicaMsg* micaz_m; - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return FAIL; - } - micaz_m->nodeid = MICA_NODE_ID; - micaz_m->request = requestNum; - micaz_m->task_i = iterations; // 0 for deadline miss - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - micaz_m->state = state; - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - } - return SUCCESS; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Makefile deleted file mode 100644 index ac59737e3..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=RadioAdcC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Radio.h b/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Radio.h deleted file mode 100644 index 67f949c95..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/Radio.h +++ /dev/null @@ -1,43 +0,0 @@ -#define MOTEIST_NODE_ID 1 //for MoteIST -#define MICA_NODE_ID 2 -#define ITERATIONS 5000 -#define DEADLINE 100 -#define PERIOD 200 - - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1000, - DEADLINE_MISS = 4, - DEADLINE_MET = 3, - STARTED = 2, - START = 1, - REQUEST = 0 -}; - -typedef nx_struct MicaMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t request; - nx_uint8_t state; // state of operation - nx_uint16_t task_i; //number of iterations to perform the task: passing 0 means deadline missed - nx_uint16_t deadline; //deadline for the task: passing 0 means this is a request to start - nx_uint16_t missed; //number of missed deadlines so far - nx_uint16_t met; - -} MicaMsg; - -typedef nx_struct MoteISTMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t state; -} MoteISTMsg; - - -/* - * The MicaMsg struct - * - * parameter @state has the state of mica's operation such as: - * 0 - requesting - * 1 - start order - * 2 - deadline met - * 3 - deadline missed - */ diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcC.nc deleted file mode 100644 index 375839c82..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcC.nc +++ /dev/null @@ -1,44 +0,0 @@ -#include - -configuration RadioAdcC { -} -implementation { - components MainC; - components LedsC; - components RadioAdcP as App; - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //timers - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //Frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcP.nc deleted file mode 100644 index 94190a013..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioAdc/RadioAdcP.nc +++ /dev/null @@ -1,308 +0,0 @@ -#include -#include -#include "Radio.h" -#include "Msp430Adc12.h" - - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif -#define MAX_FREQUENCY_INCREASE 5000000 -#define MAX_FREQUENCY 25000000 -#define START_FREQUENCY 25000000 -#define SAMPLES 16 - -module RadioAdcP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; - uses interface FreqControl; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - uint32_t ActFrequency = 0; - uint16_t deadline; - uint16_t requestNum; - - uint16_t adb[SAMPLES]; - bool AdcDone = FALSE; - - //prototypes - void print(uint16_t iterations, uint32_t elapsedTime, error_t status); - void showerror(); - error_t configureAdc(); - - error_t SendMsgTaskDone(); - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus); - void uwait(uint32_t u); - void printfFloat(float toBePrinted); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - - event void Boot.booted() { - printf("Iterations,Deadline,Frequency,ElapsedTime,Current,Voltage,Status\n"); - - if(call FreqControl.setMCLKFreq(START_FREQUENCY) == SUCCESS){ - ActFrequency = START_FREQUENCY; - //printf("Frequency at %lu Hz\n", ActFrequency); - //request the adc - call AdcResource.request(); - } - else - printf("err: Could not set Start Frequency\n"); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - call adc.getData(); - uwait(1024*5); - atomic if(AdcDone){ - print(0, 0, 0); - AdcDone=FALSE; - } - call AMControl.start(); //start radio - } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { /*printf("Radio started\n");*/} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - //printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - //printf("Mica: START.\niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - requestNum = micaz_m->request; - deadline = micaz_m->deadline; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - //printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - //printf("Mica: DEADLINE_MISS:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - call adc.getData(); - - if(status == SUCCESS) - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - - AdaptFrequency(elapsedTime, status); - - atomic if(AdcDone){ - print(iterations, elapsedTime, status); - AdcDone=FALSE; - } - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } - - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus){ - uint32_t newFreq; - float deadlineWindow; - deadlineWindow = deadline - deadline * 0.5; - //printf("Task done! Elapsed: %lu, status: %d\n", elapsedTime, taskStatus); - //printf("Act Freq is %lu Hz\n", ActFrequency); - - if(taskStatus!=SUCCESS) - newFreq = ActFrequency + MAX_FREQUENCY_INCREASE; - else{ - //ajust to finish in 20% less time of deadline - newFreq = (uint32_t) ( (((float) elapsedTime) / deadlineWindow) * ((float) ActFrequency) ); - newFreq = (newFreq/100000)*100000; //round frequency to hundreads of kHz - } - if(newFreq == ActFrequency || newFreq < 700000) - return FAIL; - - if(newFreq > MAX_FREQUENCY) - newFreq = MAX_FREQUENCY; - - if(call FreqControl.setMCLKFreq(newFreq)==SUCCESS) - ActFrequency = newFreq; - //set new frequency to the one needed in order to meet the deadline in half its time with a 20% window - //printf("New Freq is %lu Hz\n", ActFrequency); - return SUCCESS; - } - - void print(uint16_t iterations, uint32_t elapsedTime, error_t status){ - uint8_t i; - float currentMean = 0; - float voltageMean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i+=2){ - currentMean += (float) adb[i]; - voltageMean += (float) adb[i+1]; - } - currentMean /= SAMPLES/2; //bits - voltageMean /= SAMPLES/2; // bits - currentMean *= refVolt/Nmax; //value in Volts - voltageMean *= refVolt/Nmax; //value in Volts - - currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2.92 to get total battery voltage - - printf("%d,%d,%d,%lu,%lu,%d,", requestNum, iterations, deadline, ActFrequency, elapsedTime, status); - printfFloat(currentMean); - printf(","); - printfFloat(voltageMean); - printf("\n"); - } - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc deleted file mode 100644 index 5684c8d96..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc +++ /dev/null @@ -1,35 +0,0 @@ - -#include - -configuration DVSTestAppC { -} -implementation { - components MainC; - components LedsC; - components DVSTestP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //For tasks - components TasksC; - App.Tasks -> TasksC; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc deleted file mode 100644 index 9d962687a..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc +++ /dev/null @@ -1,140 +0,0 @@ -#include -#include -#include "Radio.h" - -#define ADC_SAMPLE_TIME 10 //miliseconds - -module DVSTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - - // prototypes - error_t SendMsgTaskDone(); - - - event void Boot.booted() { - //call Timer0.startPeriodic(ADC_SAMPLE_TIME); - printf("Booted\n"); - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) {} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - printf("Mica: START. \niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - state = STARTED; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - printf("Mica: DEADLINE_MISS\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile deleted file mode 100644 index aabeeeb4e..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSTestAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile deleted file mode 100644 index 95184a0aa..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=MicaTaskC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc deleted file mode 100644 index da1aeb47d..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc +++ /dev/null @@ -1,26 +0,0 @@ -configuration MicaTaskC { -} -implementation { - components MainC; - components LedsC; - components MicaTaskP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc deleted file mode 100644 index dabe3d352..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc +++ /dev/null @@ -1,127 +0,0 @@ -#include -#include "../Radio.h" - -module MicaTaskP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t missedDeadlines = 0; - uint16_t metDeadlines = 0; - uint8_t deadline = 100; //now using this one instead of the one in radio.h - - //prototypes - error_t MicaSendMsg(uint8_t state); - - event void Boot.booted() { - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer1.startPeriodic(PERIOD); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MoteISTMsg)) { - mist_m = (MoteISTMsg*)payload; - if(mist_m->nodeid == MOTEIST_NODE_ID){ - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return 0; - } - micaz_m->nodeid = MICA_NODE_ID; //assign Micaz ID - micaz_m->task_i = ITERATIONS; - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - - switch (mist_m->state){ - case REQUEST: // MoteIST ready for start - micaz_m->state = START; - break; - case STARTED: // MoteIST has started - call Timer0.startOneShot(deadline); - return msg; // At this point don't need to send msg to MoteIST, return - case DEADLINE_MET: - call Timer0.stop(); //stop timer, deadline is met - call Leds.led1Toggle(); - micaz_m->met = ++metDeadlines; - micaz_m->state = DEADLINE_MET; - break; - case DEADLINE_MISS: // MoteIST missed the deadline, too bad.. but nothing to do here - call Leds.led0Toggle(); - return msg; - default: - } - if(call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - - - event void Timer0.fired(){ //deadline Reached - missedDeadlines++; - MicaSendMsg(DEADLINE_MISS); - } - - event void Timer1.fired() { //make new request - MicaSendMsg(REQUEST); - } - - //functions - error_t MicaSendMsg(uint8_t state){ - - MicaMsg* micaz_m; - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return FAIL; - } - micaz_m->nodeid = MICA_NODE_ID; - micaz_m->task_i = ITERATIONS; // 0 for deadline miss - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - micaz_m->state = state; - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - } - return SUCCESS; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h deleted file mode 100644 index 8d77f02ae..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h +++ /dev/null @@ -1,42 +0,0 @@ -#define MOTEIST_NODE_ID 1 //for MoteIST -#define MICA_NODE_ID 2 -#define ITERATIONS 200 -#define DEADLINE 500 //0.1 sec -#define PERIOD 1000 //1 sec - - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1000, - DEADLINE_MISS = 4, - DEADLINE_MET = 3, - STARTED = 2, - START = 1, - REQUEST = 0 -}; - -typedef nx_struct MicaMsg { - nx_uint16_t nodeid; //node id - nx_uint8_t state; // state of operation - nx_uint8_t task_i; //number of iterations to perform the task: passing 0 means deadline missed - nx_uint16_t deadline; //deadline for the task: passing 0 means this is a request to start - nx_uint16_t missed; //number of missed deadlines so far - nx_uint16_t met; - -} MicaMsg; - -typedef nx_struct MoteISTMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t state; -} MoteISTMsg; - - -/* - * The MicaMsg struct - * - * parameter @state has the state of mica's operation such as: - * 0 - requesting - * 1 - start order - * 2 - deadline met - * 3 - deadline missed - */ diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc deleted file mode 100644 index e456e577b..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc +++ /dev/null @@ -1,24 +0,0 @@ -interface Tasks{ - - /* - * Calculates the fibonacci sequence numbers to the number of the parameter iterations. - * The param deadline is the deadline in miliseconds. - */ - - error_t command getFibonacci(uint16_t iterations, uint32_t deadline); - - /* - *this event is used for each iteration done in TasksP - */ - - event void FibonacciIterationDone(void); - /* - *This signals the stop of the interations for the fibonacci sequence numbers - * returns - * num_iterations: the remanining iterations at the time the event was signaled, if any. - * actualTime: the actual time the event was signaled - * status: FAIL if it missed the deadline - * SUCCESS if it has finished before deadline - */ - event void FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status); -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc deleted file mode 100644 index 3e6dfa33b..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc +++ /dev/null @@ -1,11 +0,0 @@ -configuration TasksC { - provides interface Tasks; -} -implementation { - - components TasksP, SerialPrintfC; - Tasks = TasksP.Tasks; - - components new TimerMilliC() as Timer0; - TasksP.Timer0 -> Timer0; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc deleted file mode 100644 index b71794524..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc +++ /dev/null @@ -1,75 +0,0 @@ - -#define FIBONACCI_A 0 -#define FIBONACCI_B 1 - -module TasksP { - uses interface Timer as Timer0; - provides interface Tasks; - uses interface Tasks as TaskDone; -} -implementation { - - uint32_t a = FIBONACCI_A; - uint32_t b = FIBONACCI_B; - uint32_t i = 0; - uint32_t sum = 0; - uint16_t num_iterations; - uint32_t time_deadline; - bool deadline_miss=0; - //tasks - task void fibonacci(void){ - /** - * Here is the single iteration. - * On each iteration it performs the parameter @iterations is decremented. - * - */ - // printf("N=%d, %lu\n", num_iterations, a); - sum = a + b; - a = b; - b = sum; - //signal iteration done - num_iterations--; - signal TaskDone.FibonacciIterationDone(); - } - - //commands - command error_t Tasks.getFibonacci(uint16_t iterations, uint32_t deadline){ - num_iterations = iterations; - time_deadline = deadline; - - call Timer0.startOneShot(deadline); - - //printf("Posted fibonacci\nIterations:%d, deadline: %lu\n",num_iterations, time_deadline); - post fibonacci(); - - return SUCCESS; - } - - //events - event void TaskDone.FibonacciIterationDone(){ - uint32_t t0, now; - if(num_iterations && !deadline_miss) - post fibonacci(); - else{ - if(!deadline_miss){ - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - signal Tasks.FibonacciDone(num_iterations, now-t0, SUCCESS); - } - } - } - - event void Timer0.fired() { - //deadline missed! - uint32_t now,t0; - deadline_miss = 1; - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - signal Tasks.FibonacciDone(num_iterations, now-t0, FAIL); - } - - event void TaskDone.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib deleted file mode 100755 index 27f8df5405ecbc675bdb1da328523abe0191556c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7253 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 diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c b/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c deleted file mode 100644 index 50c793c7f..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c +++ /dev/null @@ -1,69 +0,0 @@ -/** - * You'll notice that we need to include a header file that - * contains functions we need to use. Being a compiled language, - * it's inefficient to include functions that aren't needed. - * stdio.h contains functions for reading from and writing to the console - */ - -#include - -/** - * In C, the program executes the main function. You should also take note - * that we must declare a return type for the function. In this case, it's - * an integer, and we return 0 to indicate successful completion of the - * program. - */ - -int fibonacci(unsigned long int n); - -int main () -{ - /* Notice that we need to declare our variables, and their type */ - - unsigned long int n; - - /* printf prints a formated string to the stdout */ - - printf("\nHow many numbers of the sequence would you like?\n"); - - /* scanf reads a formated string from the stdin. We are expecting an integer here. */ - - scanf("%d",&n); - - /* Here we call the fibonacci function */ - - fibonacci(n); - - /* Finally, return 0 */ - - return 0; -} - -/** - * This is the simple fibonacci sequence generator. Notice also, we - * declare the type of variable we expect to be passed to the function. - */ - -int fibonacci(unsigned long int n) -{ - /** - * Here we declare and set our variables. - */ - long unsigned int a = 0; - long unsigned int b = 1; - long unsigned int sum; - int i; - - /** - * Here is the standard for loop. This will step through, performing the code - * inside the braces until i is equal to n. - */ - for (i=0;ib~zjlp_5aT2%`F|%iYMlTxlAGPq;;m*dW%4 zm8hbw@gz79*#M1Jpw0y;p$@ol7<$MWUC^> zymdm_rQQje4|*STlqp~e{h|%Z9<%x4lgm?VYF%#}Y;+9SMtpR4ifkf=-4_?+?Zj zVs}S-bBnPhpe#Fa2lUB-AIFTsR2GYs^6r`y6myu{l_Y-O<-QNOi#cxI%^ZVsD0kyv zcGguO{mAfS?Rp{d-}u0?tdTd&6@?9`EnMa07TSF7$g7jq)?4V&+VlagY-4R=&rud{ zUPCi$6D>rkyE!E>Ek)_x%?V%<8~$=E_lNBDxhK23q5~t)p2X$A;pla&m%>?)=1(t5 zwvQ)2?L${0^Z1w_`PpiCFg#O<>-js*?2Kc_bb7<+&)I)=!ZA*YRXIYnr0qvprN=(&%RkN&f>)ni_8M<&dQS6GL_{g+*S)>%`pPM#*``W%L;cBUa; zx(EH_*H_~D%f8;;-rV$iZ@>P2Zu1ejFYMk!d_UKTq z+wWCIPOvc6iaN)ISLzY;P`Pq0f5G|(n$zigsca!#x}BREC-?FSYB<)?f@4DYL1$?C z%3aHnGm*Vmdn7k|bn;$EU@n%<-)9dWEOer);mH_QUUt@7*a+LBXRC1oqgh@zUp{X+ zM=aCd@NT}XEZ6FH=i5BUT=_OPe6_y$Q?jy`96Ro&exJSQJ#x%AI+^$SVb_koF+NAL zw=8qbS(bWFXJ=g2RK5gNnRyjd3)}+l3+w61TCAPN;L1~2JA4*7ur@aZ8pG5tr{xh? z9)aZ%SRR4p5m+99N@;oI`>cdg{h z$oU=Sho0YiZvuY^c?aaf5Vo&^FmWF>j~y7l;i@70Cgdmf1CTRl&+-e%`CY~hCcm4R zV@H`hfqM9sq)&6m2Y^xhpA)~Cbt5OfTPh$Qh3L96d|Axl26nf!e9BjIs3(&!Grq<^ zW8jgx#*9Q;H!CbeAU)J?278d3DV0Zc3EzT|)PM*il4c~()ZAWY2K#K(m&gQqGBJEZ z$HF2&6b+`MA`l)*pg)zHDW!Qfl1j&tiABJGE)|KBuL=WkQv_m(7_Mey5Z7J+sFLBJ z85Ds?)aXqG`y(O{GLxw^45;ks5IRC9!TwkX29juqOF;IfTK1&D4ki2hBMDQF&wrDz z1Bvs*d6wrO0GvymsAJj)xer2~Jg+f)C|lyMW@0kozIzaoxOt0s~q1$9pBt zLNt%->p7QCHQ*oi#K*CCq6GqrjQ z(iL!Z;@B~L8=`r9zIfn(S8CKn+x@Q1V;42x)qqF;b<(^aqJsUAw;jCg;AtJXy8IH# zb<(SzI|?hye7-2GEbuv^uo@jcFBImJMm-l4=8UTK zudtd;{hlhZBa7=<>A51+x>cA@0`(qLm`@(H4i)xD%=MZJZ*}xBs`9OgMJBe4SZDuH!8 z5U(q`As;xOSb{$T%=qAV@T|KHSjSHVPVV;t^Q=$l*NS~b?HMgk1J@R{A7XpkzcTpu zJTOlTb^EUX^E^@EYVlRzGMiuStQOw_=IJoH7Uj-0;tVj4m^p8}AHJt`qWw$2-UWN_ zSZ@IHELPj&`??0ll5A6k@&7IGap*68lJ~n-{BBA6KLWpH&tHXemADPeV@=)P9bley zKZl(D@L|RGB>S(xE_o#|4_o#9iBQT+o0;C;KnVW}v~+iN86E8hyYVlAVYDtnPqY-N z!bzhqp6m(64Y^Y@f|)^qUD!Z8Vn)J&N9(sV2r7(Nc#!B3A-8u%IMd%hr0ulrZ - -int a=10000,b,c=2800,d,e,f[2801],g; -int main(void){ - for(;b-c;)f[b++]=a/5; - for(;d=0,g=c*2;c-=14, printf("%.4d",e+d/a),e=d%a) - for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b); - return 0; - } diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc deleted file mode 100644 index 0e8bc5212..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc +++ /dev/null @@ -1,39 +0,0 @@ - -#include - -configuration DVSTestAppC { -} -implementation { - components MainC; - components LedsC; - components DVSTestP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //For tasks - components TasksC; - App.Tasks -> TasksC; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; - - //for frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestP.nc deleted file mode 100644 index 3e300862e..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/DVSTestP.nc +++ /dev/null @@ -1,180 +0,0 @@ -#include -#include -#include "Radio.h" - -#define MAX_FREQUENCY_INCREASE 5000000 -#define MAX_FREQUENCY 25000000 -#define START_FREQUENCY 25000000 - -module DVSTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; - uses interface FreqControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - uint32_t ActFrequency = 0; - uint16_t deadline; - // prototypes - error_t SendMsgTaskDone(); - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus); - - event void Boot.booted() { - printf("Booted\n"); - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - if(call FreqControl.setMCLKFreq(START_FREQUENCY) == SUCCESS){ - ActFrequency = START_FREQUENCY; - printf("Frequency at %lu Hz\n", ActFrequency); - call AMControl.start(); //start radio - } - else - printf("err: Could not set Start Frequency\n"); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { printf("Radio started\n");} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - printf("Mica: START.\niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - state = STARTED; - deadline = micaz_m->deadline; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - printf("Mica: DEADLINE_MISS:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - if(status == SUCCESS) - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - AdaptFrequency(elapsedTime, status); - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } - - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus){ - uint32_t newFreq; - float deadlineWindow; - deadlineWindow = deadline - deadline * 0.5; - printf("Task done! Elapsed: %lu, status: %d\n", elapsedTime, taskStatus); - printf("Act Freq is %lu Hz\n", ActFrequency); - - if(taskStatus!=SUCCESS) - newFreq = ActFrequency + MAX_FREQUENCY_INCREASE; - else{ - //ajust to finish in 20% less time of deadline - newFreq = (uint32_t) ( (((float) elapsedTime) / deadlineWindow) * ((float) ActFrequency) ); - newFreq = (newFreq/100000)*100000; //round frequency to hundreads of kHz - } - if(newFreq == ActFrequency || newFreq < 700000) - return FAIL; - - if(newFreq > MAX_FREQUENCY) - newFreq = MAX_FREQUENCY; - - if(call FreqControl.setMCLKFreq(newFreq)==SUCCESS) - ActFrequency = newFreq; - //set new frequency to the one needed in order to meet the deadline in half its time with a 20% window - printf("New Freq is %lu Hz\n", ActFrequency); - return SUCCESS; - } -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/Makefile deleted file mode 100644 index aabeeeb4e..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/RadioNoAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSTestAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/Tasks.nc b/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/Tasks.nc deleted file mode 100644 index 2e33e2092..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/Tasks.nc +++ /dev/null @@ -1,24 +0,0 @@ -interface Tasks{ - - /* - * Calculates the fibonacci sequence numbers to the number of the parameter iterations. - * The param deadline is the deadline in miliseconds. - */ - - error_t command getFibonacci(uint16_t iterations, uint32_t deadline); - - /* - *this event is used for each iteration done in TasksP - */ - - event void FibonacciIterationDone(void); - /* - *This signals the stop of the interations for the fibonacci sequence numbers - * returns - * num_iterations: the remanining iterations at the time the event was signaled, if any. - * actualTime: the actual time the event was signaled - * status: FAIL if it missed the deadline - * SUCCESS if it has finished before deadline - */ - event void FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status); -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksC.nc deleted file mode 100644 index 3e6dfa33b..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksC.nc +++ /dev/null @@ -1,11 +0,0 @@ -configuration TasksC { - provides interface Tasks; -} -implementation { - - components TasksP, SerialPrintfC; - Tasks = TasksP.Tasks; - - components new TimerMilliC() as Timer0; - TasksP.Timer0 -> Timer0; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksP.nc deleted file mode 100644 index dcbc13cac..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/TasksP.nc +++ /dev/null @@ -1,81 +0,0 @@ - -#define FIBONACCI_A 0 -#define FIBONACCI_B 1 - -module TasksP { - uses interface Timer as Timer0; - provides interface Tasks; - uses interface Tasks as TaskDone; -} -implementation { - - uint32_t a = FIBONACCI_A; - uint32_t b = FIBONACCI_B; - uint32_t i = 0; - uint32_t sum = 0; - uint16_t num_iterations; - uint16_t totalIterations; - uint32_t time_deadline; - bool deadline_miss=FALSE; - - //tasks - task void fibonacci(void){ - /** - * Here is the single iteration. - * On each iteration it performs the parameter @iterations is decremented. - * - */ - // printf("N=%d, %lu\n", num_iterations, a); - sum = a + b; - a = b; - b = sum; - //signal iteration done - num_iterations--; - signal TaskDone.FibonacciIterationDone(); - } - - //commands - command error_t Tasks.getFibonacci(uint16_t iterations, uint32_t deadline){ - deadline_miss = FALSE; - num_iterations = iterations; - totalIterations = iterations; - time_deadline = deadline; - - call Timer0.startOneShot(deadline); - - //printf("Posted fibonacci\nIterations:%d, deadline: %lu, deadline miss: %d\n",num_iterations, time_deadline, deadline_miss); - post fibonacci(); - - return SUCCESS; - } - - //events - event void TaskDone.FibonacciIterationDone(){ - uint32_t t0, now; - if(num_iterations && !deadline_miss) - post fibonacci(); - else{ - if(!deadline_miss){ - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - //printf("fibonacci is done in: %lu\n", now-t0); - signal Tasks.FibonacciDone(totalIterations, t0, now, SUCCESS); - } - } - } - - event void Timer0.fired() { - //deadline missed! - uint32_t now,t0; - deadline_miss = TRUE; - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - - // printf("timer fired in fibonacci: %lu\n", now-t0); - signal Tasks.FibonacciDone(num_iterations, now, t0, FAIL); - } - - event void TaskDone.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fib b/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fib deleted file mode 100755 index 27f8df5405ecbc675bdb1da328523abe0191556c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7253 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 diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fibonacci.c b/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fibonacci.c deleted file mode 100644 index 50c793c7f..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/Tasks/fibonacci/fibonacci.c +++ /dev/null @@ -1,69 +0,0 @@ -/** - * You'll notice that we need to include a header file that - * contains functions we need to use. Being a compiled language, - * it's inefficient to include functions that aren't needed. - * stdio.h contains functions for reading from and writing to the console - */ - -#include - -/** - * In C, the program executes the main function. You should also take note - * that we must declare a return type for the function. In this case, it's - * an integer, and we return 0 to indicate successful completion of the - * program. - */ - -int fibonacci(unsigned long int n); - -int main () -{ - /* Notice that we need to declare our variables, and their type */ - - unsigned long int n; - - /* printf prints a formated string to the stdout */ - - printf("\nHow many numbers of the sequence would you like?\n"); - - /* scanf reads a formated string from the stdin. We are expecting an integer here. */ - - scanf("%d",&n); - - /* Here we call the fibonacci function */ - - fibonacci(n); - - /* Finally, return 0 */ - - return 0; -} - -/** - * This is the simple fibonacci sequence generator. Notice also, we - * declare the type of variable we expect to be passed to the function. - */ - -int fibonacci(unsigned long int n) -{ - /** - * Here we declare and set our variables. - */ - long unsigned int a = 0; - long unsigned int b = 1; - long unsigned int sum; - int i; - - /** - * Here is the standard for loop. This will step through, performing the code - * inside the braces until i is equal to n. - */ - for (i=0;ib~zjlp_5aT2%`F|%iYMlTxlAGPq;;m*dW%4 zm8hbw@gz79*#M1Jpw0y;p$@ol7<$MWUC^> zymdm_rQQje4|*STlqp~e{h|%Z9<%x4lgm?VYF%#}Y;+9SMtpR4ifkf=-4_?+?Zj zVs}S-bBnPhpe#Fa2lUB-AIFTsR2GYs^6r`y6myu{l_Y-O<-QNOi#cxI%^ZVsD0kyv zcGguO{mAfS?Rp{d-}u0?tdTd&6@?9`EnMa07TSF7$g7jq)?4V&+VlagY-4R=&rud{ zUPCi$6D>rkyE!E>Ek)_x%?V%<8~$=E_lNBDxhK23q5~t)p2X$A;pla&m%>?)=1(t5 zwvQ)2?L${0^Z1w_`PpiCFg#O<>-js*?2Kc_bb7<+&)I)=!ZA*YRXIYnr0qvprN=(&%RkN&f>)ni_8M<&dQS6GL_{g+*S)>%`pPM#*``W%L;cBUa; zx(EH_*H_~D%f8;;-rV$iZ@>P2Zu1ejFYMk!d_UKTq z+wWCIPOvc6iaN)ISLzY;P`Pq0f5G|(n$zigsca!#x}BREC-?FSYB<)?f@4DYL1$?C z%3aHnGm*Vmdn7k|bn;$EU@n%<-)9dWEOer);mH_QUUt@7*a+LBXRC1oqgh@zUp{X+ zM=aCd@NT}XEZ6FH=i5BUT=_OPe6_y$Q?jy`96Ro&exJSQJ#x%AI+^$SVb_koF+NAL zw=8qbS(bWFXJ=g2RK5gNnRyjd3)}+l3+w61TCAPN;L1~2JA4*7ur@aZ8pG5tr{xh? z9)aZ%SRR4p5m+99N@;oI`>cdg{h z$oU=Sho0YiZvuY^c?aaf5Vo&^FmWF>j~y7l;i@70Cgdmf1CTRl&+-e%`CY~hCcm4R zV@H`hfqM9sq)&6m2Y^xhpA)~Cbt5OfTPh$Qh3L96d|Axl26nf!e9BjIs3(&!Grq<^ zW8jgx#*9Q;H!CbeAU)J?278d3DV0Zc3EzT|)PM*il4c~()ZAWY2K#K(m&gQqGBJEZ z$HF2&6b+`MA`l)*pg)zHDW!Qfl1j&tiABJGE)|KBuL=WkQv_m(7_Mey5Z7J+sFLBJ z85Ds?)aXqG`y(O{GLxw^45;ks5IRC9!TwkX29juqOF;IfTK1&D4ki2hBMDQF&wrDz z1Bvs*d6wrO0GvymsAJj)xer2~Jg+f)C|lyMW@0kozIzaoxOt0s~q1$9pBt zLNt%->p7QCHQ*oi#K*CCq6GqrjQ z(iL!Z;@B~L8=`r9zIfn(S8CKn+x@Q1V;42x)qqF;b<(^aqJsUAw;jCg;AtJXy8IH# zb<(SzI|?hye7-2GEbuv^uo@jcFBImJMm-l4=8UTK zudtd;{hlhZBa7=<>A51+x>cA@0`(qLm`@(H4i)xD%=MZJZ*}xBs`9OgMJBe4SZDuH!8 z5U(q`As;xOSb{$T%=qAV@T|KHSjSHVPVV;t^Q=$l*NS~b?HMgk1J@R{A7XpkzcTpu zJTOlTb^EUX^E^@EYVlRzGMiuStQOw_=IJoH7Uj-0;tVj4m^p8}AHJt`qWw$2-UWN_ zSZ@IHELPj&`??0ll5A6k@&7IGap*68lJ~n-{BBA6KLWpH&tHXemADPeV@=)P9bley zKZl(D@L|RGB>S(xE_o#|4_o#9iBQT+o0;C;KnVW}v~+iN86E8hyYVlAVYDtnPqY-N z!bzhqp6m(64Y^Y@f|)^qUD!Z8Vn)J&N9(sV2r7(Nc#!B3A-8u%IMd%hr0ulrZ - -int a=10000,b,c=2800,d,e,f[2801],g; -int main(void){ - for(;b-c;)f[b++]=a/5; - for(;d=0,g=c*2;c-=14, printf("%.4d",e+d/a),e=d%a) - for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b); - return 0; - } diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc deleted file mode 100644 index c1a27ad20..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc +++ /dev/null @@ -1,32 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc deleted file mode 100644 index da2b47910..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc +++ /dev/null @@ -1,203 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 900 -#define DEADLINE 5000 -#define SAMPLES 16 - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - uint32_t Freq = 1000000; - uint32_t ActFreq = 0; - uint32_t EndFreq = 25000000; - uint32_t Step = 500000; - uint32_t timeStart = 0; - uint32_t timeEnd = 0; - uint16_t Number = 0; - bool AdcDone = FALSE; - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - void frequency_sweep(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Adc is configured, now init the system - */ - printf("Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit)\n"); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else - atomic ActFreq = Freq; - - call adc.getData(); - - uwait(1024*5); - atomic if(AdcDone){ - printadb(); - AdcDone=FALSE; - } - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ - atomic timeEnd = startTime; - atomic timeStart = endTime; - - if(Freq=EndFreq){ - call Leds.led2On(); - return; - } - } - - event void Tasks.FibonacciIterationDone(){ - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - - } - - -//functions - void printadb(){ - uint8_t i; - uint32_t currentMean = 0; - uint32_t voltageMean = 0; - //float Gain = 37.5; //(Gm*Rout) - //float refVolt = 2.5; - //float Nmax = 4095; - //float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i+=2){ - currentMean += adb[i]; - voltageMean += adb[i+1]; - } - currentMean /= SAMPLES/2; //bits - voltageMean /= SAMPLES/2; // bits - //currentMean *= refVolt/Nmax; //value in Volts - //voltageMean *= refVolt/Nmax; //value in Volts - - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - - printf("%d,%lu,%lu,%lu,%lu\n", Number, ActFreq, timeEnd, currentMean, voltageMean); - } - - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/test.txt b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/test.txt deleted file mode 100644 index 98d693eac..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/2Channels/test.txt +++ /dev/null @@ -1,165 +0,0 @@ -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,25000000,0,80,1137 -2,24000000,580,462,1263 -3,23500000,594,613,1467 -4,23000000,608,597,1438 -5,22500000,623,593,1414 -6,22000000,638,589,1402 -7,21500000,653,585,1392 -8,21000000,668,564,1322 -9,20500000,684,561,1308 -10,20000000,700,553,1312 -11,19500000,717,542,1258 -12,19000000,734,538,1256 -13,18500000,752,515,1179 -14,18000000,770,516,1161 -15,17500000,788,512,1186 -16,17000000,807,434,1284 -18,16000000,843,446,1245 -19,15500000,863,440,1235 -20,15000000,884,439,1228 -21,14500000,905,441,1245 -22,14000000,927,433,1239 -23,13500000,950,423,1181 -24,13000000,973,410,1171 -25,12500000,998,385,1299 -26,12000000,1023,372,1392 -27,11500000,1049,369,1329 -28,11000000,1077,356,1313 -29,10500000,1106,334,1280 -30,10000000,1136,343,1280 -31,9500000,1167,338,1287 -32,9000000,1199,327,1251 -33,8500000,1233,319,1218 -34,8000000,1268,312,1196 -35,7500000,1306,300,1156 -36,7000000,1346,294,1178 -37,6500000,1389,292,1154 -38,6000000,1435,284,1100 -39,5500000,1485,274,1079 -40,5000000,1539,249,1335 -41,4500000,1599,482,1228 -42,4000000,1663,246,1266 -43,3500000,1735,238,1207 -44,3000000,1817,236,1355 -45,2500000,1912,214,1148 -46,2000000,2026,213,1297 -47,1500000,2162,211,1138 -48,1000000,2344,198,1099 -49,1000000,2617,199,1347 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,59,1029 -1,1500000,774,61,1021 -2,2000000,969,60,1037 -3,2500000,1111,65,1040 -4,3000000,1227,75,1190 -5,3500000,1324,76,1164 -6,4000000,1409,83,1103 -7,4500000,1483,88,1255 -8,5000000,1548,100,1264 -9,5500000,1608,113,1235 -10,6000000,1662,104,1211 -11,6500000,1713,120,1257 -12,7000000,1760,124,1168 -13,7500000,1804,126,1088 -14,8000000,1845,129,1029 -15,8500000,1884,155,1027 -16,9000000,1920,160,1042 -17,9500000,1955,171,1090 -18,10000000,1987,180,1137 -19,10500000,2018,183,1137 -21,11500000,2072,198,1172 -22,12000000,2100,209,1202 -23,12500000,2127,224,1244 -24,13000000,2153,225,1236 -26,14000000,2198,244,1275 -27,14500000,2222,265,1141 -28,15000000,2244,269,1105 -29,15500000,2266,300,1131 -30,16000000,2287,301,1147 -31,16500000,2307,307,1166 -32,17000000,2327,318,1202 -33,17500000,2346,337,1272 -34,18000000,2365,371,1098 -35,18500000,2384,351,1317 -36,19000000,2402,351,1319 -37,19500000,2420,399,1392 -38,20000000,2437,377,1118 -39,20500000,2454,380,1073 -40,21000000,2471,419,1221 -41,21500000,2487,417,1239 -42,22000000,2503,434,1247 -43,22500000,2519,440,1274 -44,23000000,2534,453,1318 -45,23500000,2549,463,1342 -46,24000000,2564,472,1371 -47,24500000,2578,475,1384 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,58,1018 -1,1500000,775,62,1018 -2,2000000,969,65,1036 -3,2500000,1112,67,1173 -4,3000000,1227,83,1199 -5,3500000,1325,80,1217 -6,4000000,1410,84,1092 -7,4500000,1484,88,1239 -8,5000000,1549,97,1269 -9,5500000,1608,109,1252 -10,6000000,1663,109,1195 -11,6500000,1713,115,1260 -12,7000000,1761,128,1173 -13,7500000,1805,128,1070 -14,8000000,1846,134,1002 -15,8500000,1884,158,1031 -16,9000000,1921,163,1059 -17,9500000,1955,169,1110 -18,10000000,1988,179,1122 -19,10500000,2019,189,1161 -21,11500000,2073,199,1173 -22,12000000,2101,205,1189 -23,12500000,2128,218,1224 -24,13000000,2154,233,1270 -26,14000000,2199,240,1284 -27,14500000,2222,269,1200 -28,15000000,2245,279,1136 -29,15500000,2267,288,1125 -30,16000000,2288,304,1154 -31,16500000,2308,306,1165 -32,17000000,2328,314,1189 -33,17500000,2347,335,1266 -34,18000000,2366,374,1096 -35,18500000,2385,344,1295 -36,19000000,2403,354,1323 -37,19500000,2421,376,1253 -38,20000000,2438,371,1098 -39,20500000,2455,389,1110 -40,21000000,2472,415,1211 -41,21500000,2488,426,1250 -42,22000000,2504,425,1219 -43,22500000,2520,444,1293 -44,23000000,2535,454,1315 -45,23500000,2550,453,1315 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,62,1010 -1,1500000,774,60,1020 -2,2000000,969,57,1013 -3,2500000,1111,70,1058 -4,3000000,1227,77,1196 -5,3500000,1324,78,1069 -6,4000000,1409,87,1101 -7,4500000,1483,89,1179 -8,5000000,1549,95,1265 -9,5500000,1608,107,1241 -10,6000000,1662,109,1174 -11,6500000,1713,119,1304 -12,7000000,1760,124,1188 -13,7500000,1804,129,1089 -14,8000000,1845,128,987 -15,8500000,1884,157,1031 -16,9000000,1920,164,1065 -17,9500000,1954,168,1083 -18,10000000,1987,176,1114 -19,10500000,2018,191,1152 -21,11500000,2072,203,1228 -22,12000000,2100,209,1196 - diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc deleted file mode 100644 index c7b5a3fc5..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc +++ /dev/null @@ -1,37 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components new TimerMilliC() as Timer2; - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - //timers - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - App.Timer2 -> Timer2; - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc deleted file mode 100644 index ce54c33d1..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc +++ /dev/null @@ -1,257 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 5000 -#define DEADLINE 9000 -#define SAMPLES 15 -#define FREQ_25MHz 25000000 -#define FREQ_1MHz 1000000 -#define FREQ_STEP FREQ_1MHz -#define SWEEP_REPOST_DELAY 50 -#define UP - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Timer as Timer2; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - #ifdef UP - uint32_t Freq = FREQ_1MHz; - uint32_t EndFreq = FREQ_25MHz; - uint32_t ActFreq = FREQ_1MHz; - #else - uint32_t Freq = FREQ_25MHz; - uint32_t EndFreq = FREQ_1MHz; - uint32_t ActFreq = FREQ_25MHz; - #endif - uint32_t timeStart = 0; - uint32_t timeEnd = 0; - uint16_t Number = 0; - uint32_t adcStartTime, adcEndTime; - bool fibDone = FALSE; -//prototypes - //void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_1_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_64_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - /*adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - };*/ - - adc12memctl_t channelconfig [] = { - {INPUT_CHANNEL_A2, REFVOLT_LEVEL_1_5, 0}, - {INPUT_CHANNEL_A3, REFVOLT_LEVEL_1_5, 1} - }; - adc12memctl_t * adcchannelconfig = (adc12memctl_t *) channelconfig; - - task void delaySweep(){ - call Timer1.startOneShot(SWEEP_REPOST_DELAY); - } - - task void sweep(){ - uint32_t t0 = 0; - uint32_t now = 0; - - #ifdef UP - if(Freq<=EndFreq){ - #else - if(Freq>=EndFreq){ - #endif - atomic call Timer2.startOneShot(600); - atomic adcStartTime=call Timer2.gett0(); - //atomic adcStartTime=call Timer0.getdt(); - call adc.getData(); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else{ - ActFreq = Freq; - Number++; // increment the number of sequences calculated - } - //printf("adc.getdata; "); - //printf("tasks.getfib\n "); - atomic fibDone = FALSE; - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - else{ - call Leds.led2On(); - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - //printf("sweep: "); - printf("app end time: %lu\n", now-t0); - } - #ifdef UP - Freq+=FREQ_STEP; - #else - Freq-=FREQ_STEP; - #endif - } - - task void printadb(){ - uint8_t i; - uint32_t currentMean = 0; - uint32_t voltageMean = 0; - uint32_t vcoreMean = 0; - //float Gain = 37.5; //(Gm*Rout) - //float refVolt = 2.5; - //float Nmax = 4095; - //float Rsense = 1.01; - //printf("print adb: "); - for(i = 0; i < SAMPLES; i+=3){ - currentMean += adb[i]; - voltageMean += adb[i+1]; - vcoreMean += adb[i+2]; - } - currentMean /= SAMPLES/3; //bits - voltageMean /= SAMPLES/3; // bits - vcoreMean /= SAMPLES/3; // bits - //currentMean *= refVolt/Nmax; //value in Volts - //voltageMean *= refVolt/Nmax; //value in Volts - - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - - atomic printf("%d,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu\n", Number, ActFreq, timeStart, timeEnd, currentMean, voltageMean, vcoreMean, adcStartTime, adcEndTime); - } - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - uint32_t maxTime = 9000; - while(e != SUCCESS){ - e = configureAdc(); - } - atomic TA1R = 0; //reset timer A - call Timer0.startOneShot(maxTime); - printf("Fib Iteration Num,ActualFrequency(Hz),Fib-startTime(ms),Fib-endTime(ms),currentMean(12bit),supplyMean(12bit),vcoreMean(12bit),adcStartTime(ms),adcEndTime(ms),app startTime(ms): %lu\n", call Timer0.gett0()); - post sweep(); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ - timeStart = startTime; - timeEnd = endTime; - atomic fibDone = TRUE; - /*if(status ==SUCCESS) - printf("tasks.fibDone; %lu\n", endTime-startTime); - else - printf("fib fail..\n");*/ - } - - event void Tasks.FibonacciIterationDone(){ } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - //printf("data ready: post\n"); - adcEndTime=call Timer2.getNow(); - //adcEndTime=call Timer0.getdt(); - call Timer2.stop(); - - if(fibDone){ - post printadb(); - post sweep(); - } - else - post delaySweep(); - } - - event void Timer0.fired() { - //printf("Timer0 fired! end time of program not valid! \n"); - } - event void Timer1.fired() { - bool ready; - //printf("Timer1 Fired. Repost Sweep!\n"); - atomic ready = fibDone; - if(ready){ - post printadb(); - post sweep(); - } - else - call Timer1.startOneShot(SWEEP_REPOST_DELAY); - } - event void Timer2.fired() { - //printf("Timer2 fired! AdcConvertion endTime not valid!\n"); - } - //functions - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, adcchannelconfig, 2, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/3Channels/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc deleted file mode 100644 index c1a27ad20..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc +++ /dev/null @@ -1,32 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc deleted file mode 100644 index 13bea3ef2..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc +++ /dev/null @@ -1,237 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 900 -#define DEADLINE 5000 -#define SAMPLES 16 - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - uint32_t Freq = 1000000; - uint32_t ActFreq = 0; - uint32_t EndFreq = 25000000; - uint32_t Step = 500000; - uint32_t Time = 0; - uint16_t Number = 0; - bool AdcDone = FALSE; - bool flag = 1; - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - void frequency_sweep(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - //printf("Booted\n"); - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Adc is configured, now init the system - */ - printf("Number#,Frequency(Hz),Time(ms),Vin(V),I(mA)\n"); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else - atomic ActFreq = Freq; - - call adc.getData(); - //printf("Conversion didn't start!\n"); - - uwait(1024*5); - atomic if(AdcDone){ - printadb(); - AdcDone=FALSE; - } - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - printf("Task done in %lu ms\n",elapsedTime); - atomic Time = elapsedTime; - if(flag){ - flag=0; - Freq=EndFreq; - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else{ - //printf("MCLK frequency is now %lu Hz. \r\n\n", Freq); - atomic ActFreq = Freq; - atomic Number++; // increment the number of sequences calculated - } - call adc.getData(); - - call Tasks.getFibonacci(ITERATIONS+100, DEADLINE); - atomic if(AdcDone){ - printadb(); - AdcDone = FALSE; - } - } - - if(Freq==EndFreq){ - call Leds.led2On(); - return; - } - } - - event void Tasks.FibonacciIterationDone(){ - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } - -//functions - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - //float Vsense = 0; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printf("Sample %d =", i); - //printfFloat((float) adb[i]); - //printf("\n"); - //printf("Vout ="); - //Vout = adb[i]*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf(" V\n"); - } - mean = mean/SAMPLES; - //printf("Sample mean ="); - //printfFloat(mean); - //printf("\n"); - - //printf("Vout mean (into ADC) ="); - Vout = mean*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf(" V\n"); - - //Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - // printf("Vsense ="); - // printfFloat(Vsense); - // printf(" mV\n"); - - //Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - //printfFloat(Current); - //printf(" mA\n"); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - printf("%d,%lu,%lu,", Number, ActFreq, Time); - printfFloat(Vout); - printf(","); - printfFloat(Current); - //printf(" mA\n"); - //printf("\n"); - printf("\n"); - } - - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - //e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - e = call adc.configureMultiple(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/Makefile b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h deleted file mode 100644 index 381b58fac..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h +++ /dev/null @@ -1,11 +0,0 @@ - -typedef struct uartMessage{ - uint32_t freq; //actual frequency - uint32_t time; //time elapsed - uint16_t iter; //iteration number - uint16_t num; //number of the fib sequence - float current; //current being consumed - float voltage; //battery voltage - bool lock; -} uartMessage; - diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/ConfigureAdc.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/ConfigureAdc.nc deleted file mode 100644 index 28f536c25..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/ConfigureAdc.nc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * This open source code was developed with funding from People Power Company - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include "Msp430Adc12.h" - -interface Msp430UsciConfigure { - /** - * Return a pointer to the configuration that should be used for the ADC - */ - async command const msp430adc12_channel_config_t* getConfiguration (); - - async command const adc12memctl_t* getAdditionalChannels (); -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc deleted file mode 100644 index f5eb9ae5a..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc +++ /dev/null @@ -1,238 +0,0 @@ -#include -#include "Msp430Adc12.h" -#include "messagetypes.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ITERATIONS 900 -#define DEADLINE 5000 // 5sec -#define SAMPLES 16 -#define START_FREQUENCY 1000000 // 1MHz -#define STOP_FREQUENCY 25000000 // 25MHz -#define STEP_FREQUENCY 500000 // 500kHz - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; - uses interface UartStream; -} -implementation { - - uint16_t adb[SAMPLES]; - uint32_t actualFreq = START_FREQUENCY; - - uartMessage message = { - freq: START_FREQUENCY, - time: 0, - iter: 0, - num: 0, - current: 0, - voltage: 0, - lock: FALSE - }; - -//prototypes - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - error_t readAdc(); - void uwait(uint32_t u); - - msp430adc12_channel_config_t adcconfig = { - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - task void sendMessage(){ - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Rsense = 1.01; - - atomic{ - Vout = message.current * refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - - message.current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //printf("%d,%lu,%lu,", Number, ActFreq, Time); - message.voltage *= (refVolt*2)/Nmax; //multiply by 2 to get the real batery value - - printf("%lu,%lu,%d,%d,", message.freq, message.time, message.iter, message.num); - printfFloat(message.current); - printf(","); - printfFloat(message.voltage); - printf("\n"); - message.lock=FALSE; - } - } - - event void Boot.booted() { - printf("Booted\n"); - // P1DIR |= 0x40; // P1.6 to output direction - // P2DIR |= 0x01; // P2.0 to output direction - // P1SEL |= 0x40; // P1.6 Output SMCLK - // P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Set start frequency - */ - if(call FreqControl.setMCLKFreq(START_FREQUENCY) != SUCCESS){ - printf("error: set start frequency\n"); - showerror(); - return; - } - /* - * Read first data - */ - readAdc(); - - //Start the First Fibonacci running at START_FREQUENCY - if(call Tasks.getFibonacci(ITERATIONS,DEADLINE) != SUCCESS){ - printf("error: first fib\n"); - showerror(); - return; - } - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - bool lock; - printf("fib done: elapsed %lu\n", elapsedTime); - if(status!=SUCCESS){ - printf("error: did not finish fib\nelapsed %lu\n", elapsedTime); - showerror(); - return; - } - printf("wait adc 1\n"); - while(lock){ atomic lock = message.lock; } //wait for any adc convertion to finish - - atomic message.time = elapsedTime; - readAdc(); - - if(actualFreq==STOP_FREQUENCY){ - /* - * Finished, light green led - */ - call Leds.led2On(); - return; - } - if(START_FREQUENCY < STOP_FREQUENCY) - actualFreq += STEP_FREQUENCY; - else - actualFreq -= STEP_FREQUENCY; - - printf("wait adc 2\n"); - while(lock){ atomic lock = message.lock; } //wait for any adc convertion to finish - atomic message.num++; - atomic message.freq = actualFreq; - - if(call FreqControl.setMCLKFreq(actualFreq) != SUCCESS){ - showerror(); - atomic printf("error: in fibDone %d\n", message.num); - return; - } - - if(call Tasks.getFibonacci(ITERATIONS,DEADLINE) != SUCCESS){ - showerror(); - return; - } - - } - - event void Tasks.FibonacciIterationDone(uint16_t iter){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - uint8_t i; - uint32_t current, voltage; - for(i = 0; i<(numSamples/2); i++){ - current += buffer[i]; - voltage += buffer[i+1]; - } - message.current = (float) current/(numSamples/2); - message.voltage = (float) voltage/(numSamples/2); - post sendMessage(); - } - - async event void UartStream.sendDone(uint8_t* buf, uint16_t len, error_t err){ } - async event void UartStream.receivedByte (uint8_t byte) { } - async event void UartStream.receiveDone (uint8_t* buf, uint16_t len, error_t err) { } - -//functions - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - - error_t readAdc(){ - atomic message.lock=TRUE; - return call adc.getData(); - } - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } -} diff --git a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/messagetypes.h b/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/messagetypes.h deleted file mode 100644 index 381b58fac..000000000 --- a/tos/platforms/MoteISTx5/tests/DVSTest/noRadio/old/messagetypes.h +++ /dev/null @@ -1,11 +0,0 @@ - -typedef struct uartMessage{ - uint32_t freq; //actual frequency - uint32_t time; //time elapsed - uint16_t iter; //iteration number - uint16_t num; //number of the fib sequence - float current; //current being consumed - float voltage; //battery voltage - bool lock; -} uartMessage; - diff --git a/tos/platforms/MoteISTx5/tests/FlashTest/ClientC.nc b/tos/platforms/MoteISTx5/tests/FlashTest/ClientC.nc deleted file mode 100644 index 3302da149..000000000 --- a/tos/platforms/MoteISTx5/tests/FlashTest/ClientC.nc +++ /dev/null @@ -1,12 +0,0 @@ - -configuration ClientC{ - -} - -implementation -{ - components new SettingsC(); - components ClientP; - - ClientP.FlashSettings -> SettingsC; -} diff --git a/tos/platforms/MoteISTx5/tests/FlashTest/ClientP.nc b/tos/platforms/MoteISTx5/tests/FlashTest/ClientP.nc deleted file mode 100644 index 839aa9379..000000000 --- a/tos/platforms/MoteISTx5/tests/FlashTest/ClientP.nc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -module ClientP @safe(){ - uses interface Settings as FlashSettings; -} - -implementation -{ - uint8_t data[] = {9,33,3,2,5,6,9,25}; - - event void FlashSettings.requestLogin(){ - error_t status; - uint8_t i; - - printf("Second Client: "); - printf("Request login.\n"); - - status = call FlashSettings.login((void*) data, sizeof(data)*sizeof(uint8_t)); - switch (status){ - case EINVAL:{ - printf("Second Client Request Login -> EINVAL.\n"); - break; - } - case SUCCESS:{ - /*printf("Second Client storing to flash: "); - for(i=0; i MainC.Boot; - FlashTestP.Leds -> LedsC; - - components new SettingsC(); - FlashTestP.Settings -> SettingsC; - - components SettingsP; - FlashTestP.Init -> SettingsP; - - components Msp430FlashC; - FlashTestP.Msp430Flash -> Msp430FlashC.Msp430Flash; - - components ClientC; - } diff --git a/tos/platforms/MoteISTx5/tests/FlashTest/FlashTestP.nc b/tos/platforms/MoteISTx5/tests/FlashTest/FlashTestP.nc deleted file mode 100644 index 75fe3e61e..000000000 --- a/tos/platforms/MoteISTx5/tests/FlashTest/FlashTestP.nc +++ /dev/null @@ -1,86 +0,0 @@ - -/** - * - **/ - -#include "Timer.h" -#include - -module FlashTestP @safe() -{ - //uses interface Timer as Timer0; - uses interface Leds; - uses interface Boot; - uses interface Settings; - uses interface Init; - uses interface Msp430Flash; - } -implementation -{ - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - //prototypes - void test(void); - - uint8_t data[] = {9,33,3,2,5,6,9,25}; - event void Boot.booted(){ - printf("Booted.\n"); - - if(call Msp430Flash.isFirstBoot() == TRUE); - printf("It's First boot\n"); - - call Init.init(); // this is the first client - //if(call Client.FlashTestClient() == SUCCESS) // this is the second client - // printf("First Client: Second Client as called init"); - - } - - event void Settings.requestLogin(){ - error_t status; - uint8_t i; - - printf("First Client: "); - printf("Request login.\n"); - - status = call Settings.login((void*) data, sizeof(data)*sizeof(uint8_t)); - switch (status){ - case EINVAL:{ - printf("This is the first boot, nothing in flash memory.\n"); - - printf("Storing "); - for(i=0; i - **/ - -configuration ClockTestAppC{ -} -implementation -{ - - components MainC, ClockTestP, LedsC; - //components new TimerMilliC() as Timer0; - components SerialPrintfC; - //components PlatformSerialC; - //ClockTestP.UartByte -> PlatformSerialC; - - components Msp430FreqControlC; - ClockTestP.FreqControl -> Msp430FreqControlC; - - ClockTestP -> MainC.Boot; - //ClockTestP.Timer0 -> Timer0; - ClockTestP.Leds -> LedsC; -} - diff --git a/tos/platforms/MoteISTx5/tests/FrequencyTest/ClockTestP.nc b/tos/platforms/MoteISTx5/tests/FrequencyTest/ClockTestP.nc deleted file mode 100644 index 51630f88e..000000000 --- a/tos/platforms/MoteISTx5/tests/FrequencyTest/ClockTestP.nc +++ /dev/null @@ -1,69 +0,0 @@ - -/** - * Output MCLK and SMCLK on Boot. - * Toggle One Led to know the OS is alive - **/ - -#include "Timer.h" -#include -#include "../../../../chips/msp430/x5xxx/usci/msp430usci.h" - - -module ClockTestP @safe() -{ - //uses interface Timer as Timer0; - uses interface Leds; - uses interface Boot; - uses interface FreqControl; - - //uses interface UartByte; - } -implementation -{ - uint32_t wait = 7536640; - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void frequency_swype(uint32_t start_freq, uint32_t end_freq, uint32_t step){ - while(start_freq <= end_freq){ - printf("Setting MCLK frequency to %lu Hz.\n", start_freq); - if(call FreqControl.setMCLKFreq(start_freq) == FAIL ) - printf("Could not change the frequency to: %lu Hz. \r\n", start_freq); - else - printf("MCLK frequency is now %lu Hz. \r\n\n", start_freq); - start_freq = start_freq + step; - uwait(wait*5); - } - } - - event void Boot.booted(){ - uint32_t start_freq = 500000; - uint32_t end_freq = 25000000; - uint32_t step = 500000; - uint8_t source; - uint32_t freq; - - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - - printf("#\n\n|************* Starting frequency swype *************|\n\n"); - - if(call FreqControl.getMCLKSource() != SELM__DCOCLKDIV){ - printf("#MCLK is not sourced by DCOCLKDIV.\n\n"); - return; - } - printf("#MCLK is sourced by DCOCLKDIV.\n\n"); - //printf("#VCore will be ajusted to the frequency of MCLK.\n"); - printf("#Start swype at %lu Hz and end at %lu Hz. Use %lu Hz of step.\n", start_freq, end_freq, step); - - frequency_swype(start_freq, end_freq, step); - printf("#\n\n|************* Frequency swype finished *************|\n\n"); - - } -} - diff --git a/tos/platforms/MoteISTx5/tests/FrequencyTest/Makefile b/tos/platforms/MoteISTx5/tests/FrequencyTest/Makefile deleted file mode 100644 index 5c7e922b2..000000000 --- a/tos/platforms/MoteISTx5/tests/FrequencyTest/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=ClockTestAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadio.h b/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadio.h deleted file mode 100644 index e0cdf181a..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadio.h +++ /dev/null @@ -1,22 +0,0 @@ -// $Id: BlinkToRadio.h,v 1.4 2006-12-12 18:22:52 vlahan Exp $ - -#ifndef BLINKTORADIO_H -#define BLINKTORADIO_H - -#ifdef TOS_NODE_ID -#undef TOS_NODE_ID -#define TOS_NODE_ID 1 -#endif - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1500 -}; - -typedef nx_struct BlinkToRadioMsg { - nx_uint16_t nodeid; - nx_uint16_t counter; - nx_uint16_t teste; -} BlinkToRadioMsg; - -#endif diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc b/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc deleted file mode 100644 index fc7ea5dd8..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc +++ /dev/null @@ -1,72 +0,0 @@ -// $Id: BlinkToRadioAppC.nc,v 1.5 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Application file for the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -configuration BlinkToRadioAppC { -} -implementation { - components MainC; - components LedsC; - components BlinkToRadioC as App; - components new TimerMilliC() as Timer0; - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - components SerialPrinfC; - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc b/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc deleted file mode 100644 index c57a7d914..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc +++ /dev/null @@ -1,134 +0,0 @@ -// $Id: BlinkToRadioC.nc,v 1.6 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Implementation of the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -module BlinkToRadioC { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - uint16_t counter; - message_t pkt; - bool busy = FALSE; - - void setLeds(uint16_t val) { - if (val & 0x01) - call Leds.led0On(); - else - call Leds.led0Off(); - if (val & 0x02) - call Leds.led1On(); - else - call Leds.led1Off(); - if (val & 0x04) - call Leds.led2On(); - else - call Leds.led2Off(); - } - - event void Boot.booted() { - call AMControl.start(); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer0.startPeriodic(TIMER_PERIOD_MILLI); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void Timer0.fired() { - counter++; - if (!busy) { - BlinkToRadioMsg* btrpkt = - (BlinkToRadioMsg*)(call Packet.getPayload(&pkt, sizeof(BlinkToRadioMsg))); - if (btrpkt == NULL) { - return; - } - btrpkt->nodeid = TOS_NODE_ID; - btrpkt->counter = counter; - btrpkt->teste = 23; - if (call AMSend.send(AM_BROADCAST_ADDR, - &pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) { - busy = TRUE; - printf("Sent a packt\n"); - } - } - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - - if (len == sizeof(BlinkToRadioMsg)) { - BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload; - setLeds(btrpkt->counter); - printf("Received \nnodeid: %d\ncounter:%d\ntest:%d\n", btrpkt->nodeid, btrpkt->counter, btrpkt->test); - } - return msg; - } -} diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/Makefile b/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/Makefile deleted file mode 100644 index b71352121..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/MoteISTx5/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=BlinkToRadioAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadio.h b/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadio.h deleted file mode 100644 index a81d7be69..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadio.h +++ /dev/null @@ -1,22 +0,0 @@ -// $Id: BlinkToRadio.h,v 1.4 2006-12-12 18:22:52 vlahan Exp $ - -#ifndef BLINKTORADIO_H -#define BLINKTORADIO_H - -#ifdef TOS_NODE_ID -#undef TOS_NODE_ID -#define TOS_NODE_ID 1 -#endif - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 2000 -}; - -typedef nx_struct BlinkToRadioMsg { - nx_uint16_t nodeid; - nx_uint16_t counter; - nx_uint16_t teste; -} BlinkToRadioMsg; - -#endif diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioAppC.nc b/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioAppC.nc deleted file mode 100644 index cfc8a8744..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioAppC.nc +++ /dev/null @@ -1,72 +0,0 @@ -// $Id: BlinkToRadioAppC.nc,v 1.5 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Application file for the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -configuration BlinkToRadioAppC { -} -implementation { - components MainC; - components LedsC; - components BlinkToRadioC as App; - components new TimerMilliC() as Timer0; - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioC.nc b/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioC.nc deleted file mode 100644 index 65d7d40e4..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/BlinkToRadioC.nc +++ /dev/null @@ -1,131 +0,0 @@ -// $Id: BlinkToRadioC.nc,v 1.6 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Implementation of the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -module BlinkToRadioC { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - uint16_t counter; - message_t pkt; - bool busy = FALSE; - - void setLeds(uint16_t val) { - if (val & 0x01) - call Leds.led0On(); - else - call Leds.led0Off(); - if (val & 0x02) - call Leds.led1On(); - else - call Leds.led1Off(); - if (val & 0x04) - call Leds.led2On(); - else - call Leds.led2Off(); - } - - event void Boot.booted() { - call AMControl.start(); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer0.startPeriodic(TIMER_PERIOD_MILLI); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void Timer0.fired() { - counter++; - if (!busy) { - BlinkToRadioMsg* btrpkt = - (BlinkToRadioMsg*)(call Packet.getPayload(&pkt, sizeof(BlinkToRadioMsg))); - if (btrpkt == NULL) { - return; - } - btrpkt->nodeid = TOS_NODE_ID; - btrpkt->counter = counter; - btrpkt->teste = 23; - if (call AMSend.send(AM_BROADCAST_ADDR, - &pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) { - busy = TRUE; - } - } - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - if (len == sizeof(BlinkToRadioMsg)) { - BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload; - setLeds(btrpkt->counter); - } - return msg; - } -} diff --git a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/Makefile b/tos/platforms/MoteISTx5/tests/RadioTest/micaz/Makefile deleted file mode 100644 index b71352121..000000000 --- a/tos/platforms/MoteISTx5/tests/RadioTest/micaz/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=BlinkToRadioAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/TimerTest/Makefile b/tos/platforms/MoteISTx5/tests/TimerTest/Makefile deleted file mode 100644 index d6c413dae..000000000 --- a/tos/platforms/MoteISTx5/tests/TimerTest/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=TimerTestC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestC.nc b/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestC.nc deleted file mode 100644 index b7b5f2c29..000000000 --- a/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestC.nc +++ /dev/null @@ -1,17 +0,0 @@ - -#include - -configuration TimerTestC { -} -implementation { - components MainC; - components LedsC; - components TimerTestP as App; - components new TimerMilliC() as Timer0; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - -} diff --git a/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestP.nc b/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestP.nc deleted file mode 100644 index f62bcab26..000000000 --- a/tos/platforms/MoteISTx5/tests/TimerTest/TimerTestP.nc +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#include -#define DEADLINE 100 - -module TimerTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; -} -implementation { - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - - event void Boot.booted() { - P6SEL &= 0xFB; //ADC2 sel GIO func - P6DIR |= 0x04; //ADC2 sel output func - P6OUT &= 0xFB; //ADC output 0 - uwait(1000); - P6OUT |= 0x04; //ADC output 1 //start pulse - uwait(1000); - P6OUT &= 0xFB; //ADC output 0 - uwait(1000); - P6OUT |= 0x04; //ADC output 1 //start pulse - call Timer0.startPeriodic(DEADLINE); - } - - event void Timer0.fired() { - uint32_t time; - P6OUT &= 0xFB; //ADC output 0 -// P6OUT |= 0x04; //ADC output 1 //end pulse - //time = call Timer0.getNow(); - //printf("Timer fired at %lu \n", time); - } -} diff --git a/tos/platforms/MoteISTx5/tests/current-readings/adc-error/1.188V-error.csv b/tos/platforms/MoteISTx5/tests/current-readings/adc-error/1.188V-error.csv deleted file mode 100644 index 816dd18c15fa1a58221c7a50df2966d3981d3547..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6091 zcmZvgS(5BF3uyxeE!zOQ3* z6Ve0kFLruv@zUd*Tjp>hvW*95Cm z&mi8%Ls)NtBWMnjq>i%Q$mCTauF3`E6gmG^1fGYFIxZ5D=SWVD@3BC`mUw zs0{0A?&K$X>UWdIreOWjGq%J?la|Rw#*-wHm~X0*Q>B|+l1M0H>-HPo|@2%aUK&jX3Um-QkRYZTeZ z2rCJv2fU*MfdN_^*s3GQm!jBX>+DQM$Bkt*H$|SvplJg|?^tOpp~9($Qiz~j;v8)WrqvT*%?Yg*Q}B@E*1df zyE*ck0--WEJG@VrUtMfSKcQRQRkv7o+qR3`pN-;RI>(OzQm*|QNyU^wdB(uJH4si z`0YgyDW*{iv5~Q;1BNutbMA$bxJZ6B$(Y_Hxm+rHrw(#Y=vv>30 z+*1hfFcqbHods}%f#|b61|8q{&EbR(Y>W&jvh}sw7<*^DeBLHLcJIMyW)KP7rKdf-C`&yx>#mN?xJ)#^EeJ?zMMVd*1v52lHk>9Ti2)}hbcc(UI8GT8B z$V@>r`>o&b{;=TI;r~=B4Y2?m=rdQyHEj^Q4Bb%`d$VsY&*9cb+4uidtyLt;L2SQFr%s4qm;6yNMW8E{ah|A?ZM0xtBEgnC02WXCMz($m`N`IIF~5nD_p|1$ zC`lV2sGa1eQw<1GH+J^_3sKM3Hfi0OrsRumr&K|g63Geu86f_gRR*X8DTmUgVKXvP z@&W{g_=l+lPtwV@CgI5(v{GWiD&6qc?VfN8kc_-;=sO(;90&ZY$|rDNwesvc_e8~({MRw(gi4j?CcB0q*)q@ P>`dKkN_PU?e<=M6??E=e diff --git a/tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.137V-error.csv b/tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.137V-error.csv deleted file mode 100644 index d28c2ddd78d4ab09cbb7310396a585129ee19eeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7365 zcmZ9RUDAU%3(27mcW!=I_n9d@`#%4kt((u@%p7BDvHZi$?~K-cX097< zKi(7>Gv8zL_yDOX*u3jcxOn&i_lA{^aJAydX9SIhbrY^LwPFfDcGD4Xzq8;3Ptb4U zbGh+(!8BPq$^;9Zt}{$$YLg^Cyou?%p_5Cm?-?y)|5#${FsRoJV>~-(yt6GdCW$DV zGv6S~(O5YvZ3+z9lr#DmgS9mjp1sM$a`}}EnXVDE=|zBg*z)o+TCrf-OsFXDEzGx& z@UC=yW_el{KV|tWuf!BC>5@bwx#dcwC4LIm?2g;BVn)PGJC$x+hxG#|s&Up&n+9g= zc(7topBRF41#xVZPJUk)Yk}OwpKXB$W9XvJe}NlqW?j*?X$V)-Ug$B3Qv+$NHUzvP z@YInJ$q*7k?A1u&6cR$VZsrAEvm+e&v)_k&%0*$?=r8=4toX78mZ)-5G9ap__*+{; z0Smj@y88?)={#cXLv}g)O0cZ;e zR{7IUaT+b%C|h5SZ2N0^;-_h~iyhfxwY_yOV{*GxfLc zK;;uhl^+moSt=$MAz52dTMlTGjAGhQ&Li;@=WI%OZO~LR8D->wPLbopa!B?FChLen z?z+J9nVAPZzmTkDHD9(p-0cnQ8uT&-Rmvob8eLkRBY%{^^jwV{63oV{a0B<0Ckjye zS`IEsY%OCxCucv)eevtOga?KE>zPV`$>;h zER}U1e}%GmW;-PpmI`DYjaa^ST%@(DbmTf0nB5trD4h~qz{OVUAh;DZM$XOnQr|MO z4aIc>DOr=I^3!)U17oDk)y_Pq+hu$odm85E&-05stHYV1GPtf1Yueb&HKRy7qri87 zr0&s;5iux$rw)?&Ej_&)^xk2XER}sksS-d1VxE<9GtoI@ri9bN!HH9Tw>lJ`rUij_ zyI%@J#j4`RfX;lgE=g~fF=$dp8AEOPWvksN=aW&(AtWm8%yQ;Uz&|aV-Dv$xq(Sqn zEz9NhgN_&_5LmGQ?XU(0Z9Fw6T^47DD>5#eLpsPyQ{}>qJ>9hqK(bdXhfHoA@!dfd z^%-IFJe$tVj`cZ$b$zCg49xUH*3TXwGG}tZZ6$7JCaoN>b`Xa#B&r+rMb>FeM;L2M zws2mAM3OxcC-6M$)oVue!_wwfekp9{>_-kE+4gRqz|E#LO8oT)&elyt34}IFvP7AL zWV2_4;)gT0@|Kf9x1|FP7RtnzGH5KRl%KW?Ryr3jYWI~=(i<$%O%EheZA~CV&2mZW zfgCMZaTgGz?)-#7`Fp1%FMSIVi!8u*_H_IEoB% zo&rey_9NhS3c^ukG%!FEJ67c9{?E-&EL`0&kb04Br}U=ACf8?&&&}mOBIK~cPzOOG s>Xa}sG$s86wbi5p`kdKE60Gzof(4<5wC=a&Eb#h+A$s_s+eys-0ZGsXq5uE@ diff --git a/tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.435V-error.csv b/tos/platforms/MoteISTx5/tests/current-readings/adc-error/2.435V-error.csv deleted file mode 100644 index f12a221e98db8693fba0f49a1ac25d618b99d294..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7183 zcmZA5TaF_+3`EiSp2ZBxcKT8K-`D`YCxBLe3C^U*U@%B2{m=cs>+yR2`(5teBBS2|A?rF= zdZPUB3H%#9cws5c9=?R_7j{4RJo78fPaB@${N#*69(nm7BugX@XFjP%pcgNd<0<#H zFJABB^ZLnz7X^5s4m}bJi|7w5g%gof_lC@dOx}>?dL{l^UO$YV?BTdRz)w9DTn=i>HA1FAoaJQ?<8z}VNLp0m`9){SxS^BJQ4oU* zizSIkr3i4!@1v*+*FM8obAgKqf=0oHW7}cTjSHkn0$~o~?12L8=0zRGyrx7CXNc?_ zUCW5BH~dl1_HljCvuf(Ne9jq?V^>BS>55u}6{kR=f0z&o3M8E{S<>K39b_xNqHnTi za_^zyEL*%_sX(`*12#X8G}nf3VuGX&2Fd%KrCvFY30RcT0Y(~=_mSTN-0yPTdN)4d zGz-dorzj$OIPpQp z99%hcIGkqIN=%W(W9c%4@*QWp*9lD0YbUOw)w?aIvmAXp zoUmxh0CIh)SV_ChJeUM&=UCClE@vqVgPSP5Thdhw*XKE=;Ac68j3Qf<_#BlEsVPJ% z3J~}QUh*=5;rgW9C~1RPFuha&GX&h-a8V$-Y@=L>S9e$}nQWFzGw{Oh`qRUSkENoP z!#xmCZ{%eHwKHc}WP3Ewwi8jV>2tSxL?XGxP~9c*Q0oeJu(b0pOK{It+bvzTN|l#s z(C7jeA%qEpYU-R!h-fDQlU!@&Utu}R#1P2j&ScWhHMxx}a1VgeTvwIYMi7>ceJsu7 zD`&eyAH!+`H!SzwJ#0{_64UnQc-kQ)=`0rryR=J@XpQRu^vk%&%Q_s_nE<%1iiuPD zyC9$SQ$`sDchlz3H9?c`4jYsQ;*o2U!AB?}otyV^FrlZ`wl6V-D?k0P;{{xSvUD+% z9}0Gol$fJVRfI*4!)=X@YXujtU;7?Alx5EEs{m(tF=k*HPLQ}hGb(94Z4&L)oTYc0 z*9D?Mma<(VAWPd8?NJ&81tv3dbc?rP6waM0wP8DtB)!poGU*?=6VgA zr5Um@qhc&!DTlR15BJ%r?y)5I4x79GiOycx$9a%+_!OM-Hb6 z*N3y!ws#JVb&hzscFaq~tr-&=qiwji>}qR!`R%_Fg~L+35W_j{DS5~$D$(yEm znJ{f&N&0PA#~ov4%m;UUR3m6~Wi*1O@;2;dd{lFn{7lx&A{>eB5{x=ri*D)R?a1As zsMX+9chTL_-H9Av+aM5Hqg?L3Wwf>vZ;A|(2HKo}?5HMvuE%<31nt}`I+G1tszX+b gE(U3;tBj5iXCp5+%opKSw!3P|Hb~B+-{-&o14jJqFaQ7m diff --git a/tos/platforms/MoteISTx5/tests/current-readings/adc-error/297.7mV-error.csv b/tos/platforms/MoteISTx5/tests/current-readings/adc-error/297.7mV-error.csv deleted file mode 100644 index da42f68a14137c6c0da26c8823d4e67dae11f8e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9969 zcmZwMQF0?Y4n)!Uev6r~B}=mQzp;^ZPx>`G=8K^!f=DEiAXxg($A2%+=jT5^!|nDS zzWQ~)ynj8P@8NE^{yFpR*Z2G3BZGUZ-0ts(U%k6E^WMXUDGf6?KwN>y?vWix_eUUt zw8db7lfl<}CWG1a@WG(P?mfKqYZO=o&O!nA5kTJeurIy9-)61Sb86){V51a`s zA_w<;*RMqsGN|n_AjJN8c=zxwu!6oF`6G5By5;ZL6z^0i;`{oE_WHrmB?FMY`gJX^ zE0PJbhs5{AgF*f*)27-i7)tjqArpcIv!5 zoTrRm8|;7|yI*rl?+g%1ODoOOu2hk?G&YmUr}-W_t0;0zNC1*i-eTJbO_})tNfF=a z#5)6ILB>N;#Qa~;HpRZBRtMNn3q|Y_K;D@vfFPZDxCVZqFfR|%PfH4t4Rk5t_U5Bs zE7Y(6(K~y3>VXUs82rCPdKh(1$_=uTzo|9wtET;ejEKJTt{|->w93>fRTL>A(&!yY zEgfO8E!HLArNO&v=I;V{dD89{16R;7xC)lt1(t&>N1gaqY0adN3}E9z_@{!Y}8WhZf~rli;u^cdcH`E4X@ zbkVLm%#j=!^B@7m=Q=K{bkZo_an6mBR`xtz6PjW;r0z)0QO>kc2-$B zvUcIXZstzkee6#m_R0=+>d6BlKa=VDvldhGsAsi~_spjWft{JAB{DUo7`6?2xBGMn zSQ@FoDijh_$`!(>0P+Oqs?mt`AyQ4kh)V71z4a zDLH?3zjrzol<(TYADQ;+(qPBgD-$N1WD}O12uRL+Uyb^;1B{@_G=rIYchEy_7L$NM zDopR_Y$f)HXvG6+k_x=jf+qA!+)nJ$Q7D*Tu&RLD}|l%vC7{?OAvFK6kp9~4I?m*JC=BXV_6m5K@XDmCPiBN6Q` z6E9ALb!5Ta*VlfnjOJk%F*&jWgvsFN;j5p3rNr%=ZpyAuh_rMDC|@3UIMNT&Ut9~b zHP)MrWbyfyfna5Z_V!;-8ZIe!lJ zonuizk(QqL4xyasUw4mkDnR)kEdBDbEn}v1n@Jnv62A1Fpm_^E?VuCeXIh4TFcQVLK+6QDgJ4qf)z3>1%hn$ z#hP0lnmK7?0Me)n(r)Dx(kc@}VXinH`4jE_(*VgTsLOoqNK4ysYeS(17p)EFxuRk& zV^q#9e^zO5C4H~*k|IGDw1^y-`j8d>)^tAjPPAUiDxuybCSE2?1rV~{$-`0{c)M!X zB+O^90|g;1w*09f1x*?|Wl)En7TZzBEy@eU&2$&{=vnn{vF$N-7!1M E0D6w&od5s; diff --git a/tos/platforms/MoteISTx5/tests/current-readings/adc-error/gnd-error.csv b/tos/platforms/MoteISTx5/tests/current-readings/adc-error/gnd-error.csv deleted file mode 100644 index 0aadc8bba5e262017843e015158201c5edff9fa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7001 zcmZwMNwV885ChPxbC{GSJIVbomH`h7xc-Voss{kwBqjUX@#8qoU*G=?$N7Ia-~Wf} z$l}iouRQymS%&i&6SKG<@v8}U&tiGriJ7#Am@YDcI^FO7fj%EY0Xi0>NY;L5N)jCUHN(9fxBx3?w2Sakyldv}9GPR)vC4 z^8>=O(7cI-5tD$>QhKS)KzXRa9Y_~`v)C@+7kO@iXg6?S(IN6>xH!O>#T(o>w6n$p z6+-S_X#uDtihMwzqNO6;r7nj}EyUBNhH2gl& z0!Sq@iTI6lJ$DHrLs0jS13tk{GnyqPWG;s84&?xXF0vampV>&>3q{%_I!PBxX?vYP zMtRkYWt-izX;Uv5ZDBQs63TFbZ3LbH8lrbAdJW-nSMf>CL)ghP*@SgLKWT`|E;ar#2e zJwta#u=G+~DucS0FdNXUNWlS6bzW?rk?{0);TYngNwe7nb4jd3O&=dHzT$=kVvtDkpPp~!$@T8-Q z0b72WVKtK$z*Q+xdfcZDy;H@MJ({)oa90jx9Ebi|Av^a7;ya-A1L-TV`kFS4^5LhN zNz@V#O?$KZeH1KCwZ#GIl@17`msn!<42k7_TNL$*MM%LsBRLKV$3%8|&a4^uWpILh z6gAKK>krEmpv@qP3$r$v+5alA4UdB z^w%HxQht7S;J)=lqCBDb&cK}mDkMO&eXWT`mn~eCpJwl`sQiMn2mBPyn@;~S2;9Hz F_6NDWm!<#! diff --git a/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv b/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv deleted file mode 100644 index 267823af81b58b6ff4355ff12d3e274bc39535a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1326 zcmY+E!HyF_3`9BiSLC=zjnr=2-ED3hKyZKy{6Gjfti*;Tn;^m0^Li$OmPi>Tp6YVB z$}=zC-GAMExE#;>%l(hj?$h-lzd2m4`|t10$Dh~Z>G1pR{hyZ^)T^h<{(Sjz|8Tr} zcv>sR)3<;B57+bgc)EN%?oW48zusS7=BMl9kV41Nv@-}yc}6LrE|!X%V^2qUc1+jmbKQ%G1(W^+H#FTlTb~b{RY+QK)oQhLT?Ri zbmX+5w+>B>8CF_#x2&C!gdgzI9R$bCxeQ4?_YK==t$|vZvW+gwWZFY;r}i}R*su{b zo7fzA4&)AR&^|_Erdkt&+^{CIhB_eA+DYE1_xEXtEYPiDuc-vq8od z1-B@#N`hdhqhuILhI2x1Z;{+ zMfZ$hL$iw66`K^x*2IGVo!q%J9Ap``9DQ2t1W6i;CyW{_33YlBdXgF2#%-K+8yJIC zOv(BM4!SY4n?;hyvSsOW?cDp4$5gWHH|?A~#qN@3#49z@oQ?9v_8H-=>4YM}1My8I z%>~}F^fqYQ*(vOrXg0L4($pJuc8aW7q2)uNgC5GQxmgQZ0?EB|WQe9p%PmVE9XT}-M=W3& Tp60uUH{9;REARErN0Iaw<7XVl diff --git a/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv b/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv deleted file mode 100644 index 45ef1bd1ac4da465cbd954bbf451027e79a486cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 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 diff --git a/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv b/tos/platforms/MoteISTx5/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv deleted file mode 100644 index e5195371434e4b36d5f1e20180d32264b1a7bc1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1304 zcmY+E&5jd641_uNQ{=cvMrzyb{^7=f6&&CKFAzcwEA56Qn;AxA(Wl{m=9MuzSAw@cXrZdh>MJ9#3EI9`-j6 zPnVPZ;rrkF-T8RjA5Ne4+ry38x4YA8c{)En-ao%Q`L+9T+`l~7e&2ohFD(b}Uu4}r zK5qW2`*!2rlZr)NmK4iUS{831R-%h*a92Z0iDaBzfss`rOrnhmEC5TDGKPdlaxq_l zL#38jzyKX!BeV~x7O9BY6W=K_i;ANr@$86B{;U6n;HY7wuQ1<^q%@1*%pm{p4JT z_Q9n^Vrwf{-9-&@B`-Y%V56?WUbWVw>~%#ORC%J}gRzt#WK;lV$|YK&DrzhXAl<7E z6lzlzq_WY;?FvCJBh7tPi$63`Mimd#zM#>9bF!48Nx4}i(?D~r=;@RO&4{T=@j`*< zo)o65ZdwPijogO%pqWcls8%%AhRBoYDxP-a)ls0^a7jTTi_TGZLVCrG++3QZ;+Xbg zxFDy7jKk^#jOkC*Oo+CsXlmeij`^06z^EdZsS-<5iG3B)uptTIpbP7n*^Q*mBy5=< z#=8#NVjk83A-s1P-x42aYf(z#wOMtvmf<`m%Q=dLvrlGiw$XefhPujV1B}~L$EWD{ z2^upV38tXQ4EHPx+ynL7v-AgW CjTcD( diff --git a/tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv b/tos/platforms/MoteISTx5/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv deleted file mode 100644 index d4a96b58f969a5b2b26f8a553e73de917e5f2e6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1277 zcmY+Ey>1&p41`nfQ>e5723T_c-KB_;6iJi3fGn#JV9Sau1#q4|AJ1CDR&ml%v*d7Q z?mpe_?pEJV+vEDQd)lvlo*(7Q=5$^^+#a`o&fERwQY;-{H9$jhFCmGg2^=Ox z6<~B=0XQ5qq*w`A%r3x^02Y(PK!BWxBS}e7O0A)Y=>#^)BTLo==o}ea=wD+E(0Rpi z3!tVdIXbXHR!gJGKe>e_IxZb+$x>Tmv~yg5sYr!G?JacCK7pf1L!wmQwr+q}u~`p8 zv|WIWv8|$9Ux2jM2q-10BfvoGL^8KW^j%06-v&0VW$79N!s+y;YnPr;x*^7erGhHb ziv~5(X-;Q_4ynX9QZ5Q{mgW0M0abLmGhj8~nqUT!AI8W&I@J<1i%xq6ifhCpjGj%Q zJO;Z&YXKTM9n#oQSIu+eneo2L1nOK=QJ`{jQ9zNGImTAiQwL4Zh^b^tO)Y4XX_Xqv zXfo(x&t0dSRO=TtE-duL(<81XFn`N{>gf)1IMY4&1q(yzhtOcN^gVHh3uhhxEtsce#9%7ZIIZ5H5mLAIm4*@w>eyR*55}W2JNF29FbkFw z%wyph#PH4xymU5odDBoC-Waw#ioPx6O$i1%O$ROG fv~`|T6uk6xn7RSH0$ z|GPAHWdCekik6T?^#Ux3z@n0xcRT|LN>NI!p@?DvTawZ_45OoYM@S)=8f&O>X~;(; zsi{ip!{I$H>e`DzV*JN~IJ=O|7TETTFL)ROv2JqQH6ZIaQjMy)#WC56?4mh(t!NRzR0&8Js4Hljh#j3Nr9r zkvrq>2^$x2lo*w&!A2BlATg{nN+>-B251_G>K)oR9+B-%gJ4e>s##E#=^e!&xN{cH zo_NTpi)WBOsRr&o?L&8msVLQ)?;&`OP8ZR=GgrBAR@COIIe0ASUV4_mU?`Xj3N?34~!HRst z$M;BG-RRhiPp9!PeIK`nYtj4tbQ53B$K&Jc`^cZ&^J#n^*goujeke=e%e$)E<8kwW z_jZ#~4-&Nu^NCr9n5)IqYt&r$klbUcCFWeh)&DNfW_@T(O zi3K|}SKf#WgtT$h6jIc*fD0w9v=j?&Q5VbHH!A|TloWDQUBK1L)LLUv2Un$uRtOD% zYfhm=l?B`ez>Pr^fiTxbW%tnn%8z`{W>7{E4Es8Cbd)H_v zjE)1Gyl0AZFK<#qk1)-L-z`Ua%E}&iAM<8l3<>eX(1JywSw9|NV`PwIY}Aa$X~9v? zsNcrg0j%o_DKs}|$}wG<=R^3SN^x!)4+7V+sbI6$O9}sQ{>>W{c&7T@H3($ONWq$O zX9OnXUR0={b4WNuMsvVsS>`H3p&uD);zerC0h!E_3o-Jw1p%@Q7i{xN4cigy94Obp zdF$+96LcWUP2&*n>J}PIYW}aQ^CaAj&iZh(KjMNe$Fc4%2^O=i`=$=DI@dC~Vn3D# zV6jScUe4Jn-{#^)kl=TgfDg;K1qTo%zV*t!qrx{@J%%@ary9iKI&j7UvAB2_iwI|6 zG!*e6N=X{{ldSWWYWT!ZNw$SST`w7b*3<&Vtm78TBvt$wp29FY>`=?jZLI}mKNr#J TazzWB(C+fUpOYbmuonISBVoElp)621akW9lVSP!Kgo#VpjSQ_q$vT?=OF zRmg)?kBY`rBp2$)=x(VI`?aE@5zgEw8o3~IQ*w3kZmARZE0QzXU|gg&XqG5y$S#hh zS;DPNFqc9s8Fj$|Jps(6A|LFTYfX%MooE3FUqG{?2{mZSl~F)qv6iqaPouanb}in4 z&Vi2F3~rDYi+YOtbPEq?LcLNMv<+!oBNW_KIWd?{%h)VJd1sYUJV(Itk4p(W~v7BD%OPV=~j0Inba(=O;CU@z#dS4<+Jh51CLXd4+548IXaXy}K*n_!Dz zbqGCL3_(C4j!i783CCvoC@nA^ZFKCb7(&oMsEsy?C-^yS6c3vv+`)W;^DsT~VS#vW zNra}01w#M>G3Y!F(`YabtAKbBOezGJCYFlf(k!98H-*FBLK{04t1136_?K-~{M_y~)|#Y$4Zasv diff --git a/tos/platforms/MoteISTx5/tests/current-readings/radio/radioON1.csv b/tos/platforms/MoteISTx5/tests/current-readings/radio/radioON1.csv deleted file mode 100644 index 33bfb0fbfa61eef4c3ef17090f6a677c41b81867..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9012 zcma)?+iv8@4Tf{Ar|<(b1l3Wh>tq+mb%MD!W;?+Evv%U~Ajq5NG9SsJ)ZJ<=)Pn(R z;5Um!{ybLy>93#HkJry{?{7aYf4RQ?_Wj%2_44b-_1{0QZ(sj=`Q`iTzkXbQ`}?=w zua`gn{P?)OeO|u2fB$^_=k@Zp&)3hNKZfZd|6-Z+W50|kmP;J-^1pBi)1?1bL;#cO zxWoXYhBCwh%sjT(1T&Q(9b%?wQ8{_Ym*i)4WwIQ#jPoMe)Hn@gg@kJQW>qJS(;UI% z9EZBYlq7P(Xh-EV5Az|WRZ%&oHY^uxVppH-EYvVLDJ!N9ZHFmh&4fOSV)8VEX#=^^ z%>;!wcR?ZSKt*pB#@0-uWeD+tCaO~El4d_$UJCI3=V+s{e$!Q4r0F=h4 z1}GRHlnvA^P@>%~qY9F091z*MPPv1sx(!K-=u{R=FmIqc6X4Y(?k@|sTXrB*JdHWR zP(Uc&4nT37IYmHi03DpR#g$Uc5!LKGXbZO=QSQA~43&lmyPu;HA&~q;`28Fe$5zzp zOBiCl1gCg)iz*e;I9IzO+LtFNb#of!4DL8DL#)TBW_N68Ki{AhW3d}`s_Gt*wOoR8 z9X;f8L1}oL$Em1QMOM2(x%SG@G^WX2ov{5X%TcO*hFYq9n+Mo>fWkwX5DNB6*d7r| z_{C+-rdLF1EYX%BVf!7b+iU6CPXi%)fXd^n9;#Cv61G2>dF=G28RBK|@I^`i@`y*5!;!Re@yw1Wfxg#}c<+05!jFfo;yJJNj z6GzFJ(~t@AO`5~>0%eR^AS5C)ryszOrZ*_94ViT4+z+0-i)IR>k;b?JNg!jF4d#a` z%QD4AZYuW3gwzJJ+I7hqN@Xk-mMsn$?rty)sLa+(kjFAf4yzL|sN|dtkknvWG>`@- z#Jm^;%WSYa-O4yM&4_rE9P$L#?ba-lVGzRb7#7W^7=(@xlhXvs=YklBgsM3Rm7>{KV&Cd83S(T4m0XuyIxf&;I69q*;GJ?Uxwb z!@6$dK{an0B;_8!s`MG6TZlu!3kR?=&f;;Ll?GBxT4_lQvMY4E6%D@{rhy#z1g5&x zF$m3+AvOL1tcg|8tq$1vkE9vj!a#vcD=pVTpnR)it9ocyhDx`yhjraD1weG02k;xr zeC5uXxq`75gV6JA(mKg4WGWR!?4|};E@>tCjG_5l%%}4ht?aivkma7hx^8oC>B4|> zk6<$mof3&yAT=GqDs^4$7SceAmsVOX9;X`4Nb9M78D_k&hpBEe^~{J=h8ZtxFu$p$ znt5F4kj(W^aGDvG`H!{+U7gky}m!^C}nvfP}aRt1v!5*Y}wnQ3U*kI0H)omHW z;?A1!!XDOdnzSV>q`@y=zrK9?@$&ip^8NikFaLP|czJ#K^7Z}W`tt4V>&Nx=$8}hy zOZISyldG?kTzcIWcF@s1f%OAP^W3sf-j{d?Ti}{RybKO!^h&pqveD64J5#sKN#T^F ze96xL7*&uHd!c`^5I!fV+(?o(hEFd(3w^)dj<{Uv6PPua%UHV)>%b42UM|gG+^|ZQ zBg8pltL2hCbfe^N(aUBZ4y2h9t1qV{wHry2(Nt2WU!(^YNz)lg4a;mg-DRCN1{z|K z)CSswJTQxdB)So@O}6Jq+@Rhj>5jy0 z?HEBFWy+De5qLp3{ttM+n3hNFyx_WW7sn!UN zG-h!m1Ii%|dD3j-?F#NGzg(Ur$jBmsrsL>b*rNlzjAf^M3B%Sfvv?(sEi!qMMEVs@ z)m63vH=;ZrIj3_U@X(&7dOOl_PU=kaCZs-yMD&`{lox=US+s;PA@%oqatz#3b;MaOk_+t?|kfEn@-hdfd)28$a#yY@W`RC71=E>J_C;Cds~`V3AmF)kkA2qx>Z*^8bbHQn~UcQaD6 zsa;3wz{YEjb0#uLDHCxNQ}z*##>HyUM4Xdkj&QUkeN+&6G}>$4(0U|ol?EO1Cd&sn zp2262bN!O8g=9{Y-Rg=9?XLBh$Fx|l%D$Ap*yCJYB!Nog$+4YE|l08h6e%GBHJH`!WB=XF&%2S9n;;gCJi|ui% z->eQwB4aUjgk!bP=Sz6SX6y*ZfT{Z;X_0l3_xM=1Ev{d*0fuFkE-iLA(+@lMK}T@Z zlmi@#6nh0=ofV+?4bJ_mDUH31@qp|Yq++k}u@+6WUm2O!l?V6(RrWa7FWdHm@hM28 ztnwrRq(e2H7P>)c^JKUU_ZzYY{h}>4R3407dFta48y@_NJT^Qc5B|wexx=}BQg$SM zxvwk|4seBmQt!LSJ@|_a_n;pExXQyHEAM?n%KAq2OUkRV;1B6!Hk`+Y`hyjz4*fDP z25C7r92(r(uV^=2SY~t5Ezb4pOVY~3A@{{^lHt5prYY<4x_(vjmHI<0xx<nj>#%`?3wzrr&-LiKW6Yk>98|+Ru*8H|qV_pob%l0tU zjh7vH1h8j3XurW8INZ4|H3%(tFJ|Ob$>?KdNrp5@jr_EOxle;V3rZ$qU3LKDWsP-> z=*AUjaSmYk)Z$Ql$}VB|=I6RaYX^A43hcsmFw+g68p|b%(Uu>=CVNHUr7pnZLs;uM z5rz({(|e zyBBQAxau|aX9aA*(&!Q8QBde2(7qxIqpT?BquwzxW$I>GQ8#bqj&eHExrocj`HeBT z>*bY!gU}0E+IeawVyJjTxxJDO`1<}%#(a+AEN&)WQh*lBPAkfTu3IAM&ORp?OBb`I z@Qxy>s9sg+FJDv$Joi4LD2i&;q|=MZqF?HF^y*^EL9wR - **/ - -configuration PrintfAppC{ -} -implementation -{ - components MainC, PrintfP, LedsC; - components SerialPrintfC; - //components PlatformSerialC; - //ClockTestP.UartByte -> PlatformSerialC; - - PrintfP -> MainC.Boot; - PrintfP.Leds -> LedsC; -} - diff --git a/tos/platforms/MoteISTx5/tests/printf-test/PrintfP.nc b/tos/platforms/MoteISTx5/tests/printf-test/PrintfP.nc deleted file mode 100644 index 587114c50..000000000 --- a/tos/platforms/MoteISTx5/tests/printf-test/PrintfP.nc +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Testing types and variables in tinyos - * Use UART to prinft - **/ - -#include - -module PrintfP @safe() -{ - uses interface Leds; - uses interface Boot; - } -implementation -{ - #define MHZ 1000000 - - uint32_t frequency = 12000000; //1 MHz - float dco0_max [] = {0.2, 0.36, 0.75, 1.51, 3.2, 6.0, 10.7, 19.6}; - float dco31_min [] = {0.7, 1.47, 3.17, 6.07, 12.3, 23.7, 39.0, 60.0}; - bool rangefound = FALSE; - float ratio = 1.12; - uint8_t RSELx = 0; - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("\n\n%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - event void Boot.booted(){ - - printf("Searching RSELx for the frequency of %d MHz.\n", (uint8_t)(frequency/MHZ)); - while(!rangefound){ - if((frequency >= (uint32_t)((dco0_max[RSELx]*ratio)*MHZ)) && (frequency < (uint32_t)((dco31_min[RSELx]/ratio)*MHZ))){ - rangefound = TRUE; - printf("RSELx found. Use RSELx = %d!\n", RSELx); - } - else{ - RSELx++; - printf("Try RSELx = %d...\n", RSELx); - } - } - } -} - diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc deleted file mode 100644 index 7ea1a1ef3..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/FastADCC.nc +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultiple(); - - event void Boot.booted(){ - call Resource.request(); - } - - event void Resource.granted(){ - uint8_t i; - error_t e = FAIL; - while(e != SUCCESS){ - e = configureMultiple(); - } - - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - - for(i=0; i<5; i++){ - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - } - - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - printadb(); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.461; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - float Vsense = 0; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printf("Sample %d =", i); - //printfFloat((float) adb[i]); - //printf("\n"); - } - mean = mean/SAMPLES; - printf("Sample mean ="); - printfFloat(mean); - printf("\n"); - - printf("Vout mean (into ADC) ="); - Vout = mean*refVolt/Nmax; - printfFloat(Vout); - printf(" V\n"); - - Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - printf("Vsense ="); - printfFloat(Vsense); - printf(" mV\n"); - - Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - printf("Current ="); - printfFloat(Current); - printf(" mA\n"); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - printf("Current ="); - printfFloat(Current); - printf(" mA\n"); - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultiple(){ - error_t e; - printf("Configure multipleRepeat\n"); - e = call adc.configureMultiple(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile deleted file mode 100644 index d0904ef73..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat-mean/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=FastADCAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc deleted file mode 100644 index 28f536c25..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/ConfigureAdc.nc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * This open source code was developed with funding from People Power Company - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include "Msp430Adc12.h" - -interface Msp430UsciConfigure { - /** - * Return a pointer to the configuration that should be used for the ADC - */ - async command const msp430adc12_channel_config_t* getConfiguration (); - - async command const adc12memctl_t* getAdditionalChannels (); -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc deleted file mode 100644 index 790561e6b..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCAppC.nc +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc deleted file mode 100644 index 100ac4cc9..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/FastADCC.nc +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * 2 Channels convertion - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 15 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource; -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_1024_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - /*adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - };*/ - adc12memctl_t channelconfig [] = { - {INPUT_CHANNEL_A2, REFVOLT_LEVEL_2_5, 0}, - {INPUT_CHANNEL_A3, REFVOLT_LEVEL_2_5, 1} - }; - adc12memctl_t * adcchannelconfig = (adc12memctl_t *) channelconfig; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configure(); - - event void Boot.booted(){ - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configure(); - } - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - /** - * Conversion results are ready. Results are stored in the buffer in the - * order the channels where specified in the configure() - * command, i.e. every (numMemctl+1)-th entry maps to the same channel. - * - * @param buffer Conversion results (lower 12 bit are valid, respectively). - * @param numSamples Number of results stored in buffer - */ - printadb(); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - //functions - - void printadb(){ - uint8_t i; - uint32_t VCurrentMean = 0; - uint32_t VCoreMean = 0; - uint32_t VbatMean = 0; - - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Rsense = 1.01; - float curr=0; - float bat =0; - float core=0; - - for(i = 0; i < SAMPLES; i++){ - printf("adb[%d] = %d ->", i, adb[i]); - core = (float)adb[i]*2.5/4095; - printfFloat(core); - } - uwait(1024*6); - /* - for(i = 0; i < SAMPLES; i+=3){ - VCurrentMean += adb[i]; - VbatMean += adb[i+1]; - VCoreMean += adb[i+2]; - } - VCurrentMean /= (SAMPLES/3); //bits - VCoreMean /= (SAMPLES/3); // bits - VbatMean /= (SAMPLES/3); // bits - curr = ((float)VCurrentMean)*2.5/Nmax); - curr /= (Gain*Rsense); - curr = curr *1000;//value in mA - - bat = (((float)VCoreMean)*2.5/Nmax)*2; //value in V - - core = ((float)VCoreMean)*1.5/Nmax; // in V - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - printf("Current,Supply,Vcore\n"); - printfFloat(curr); - printf(","); - printfFloat(bat); - printf(","); - printfFloat(core); - printf("\n"); - //printf("%d,%lu,%lu,%lu,%lu,%lu\n", Number, ActFreq, Time, VCurrentMean, VbatMean, VCoreMean); - */ - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configure(){ - error_t e; - e = call adc.configure(&adcconfig, adcchannelconfig, 2, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h b/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h deleted file mode 100644 index 94c62756e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/MultiChannel/MultipleNoRepeat/adc_configuration.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "Msp430Adc12.h" - diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc deleted file mode 100644 index 10c452b52..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/FastADCC.nc +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_8_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultiple(); - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void Boot.booted(){ - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - printf("Resource Granted\n"); - while(e != SUCCESS){ - e = configureMultiple(); - } - printf("Starting 1st conversion\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - printf("Samples ready\n"); - printadb(); - uwait(4096); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void printadb(){ - uint16_t i; - float voltage = 0; - printf("Printing buffer\n"); - for(i = 0; i < SAMPLES; i++){ - printf("adb[%d] = %d ->", i, adb[i]); - voltage = adb[i]*2.5/4095; - printfFloat(voltage); - } - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d Volt\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultiple(){ - error_t e; - printf("Configure multipleRepeat\n"); - e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput deleted file mode 100644 index 741e49085..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/AdcTestSamplesOutput +++ /dev/null @@ -1,244 +0,0 @@ -Configure multipleRepeat -Starting the ADC... - -Printing ADC set of samples Nº0. -Sample 0 = 3830.000 -Sample 1 = 2989.000 -Sample 2 = 2546.000 -Sample 3 = 2283.000 -Sample 4 = 2114.000 -Sample 5 = 2010.000 -Sample 6 = 1929.000 -Sample 7 = 1875.000 -Sample 8 = 1839.000 -Sample 9 = 1812.000 -Sample 10 = 1805.000 -Sample 11 = 1786.000 -Sample 12 = 1781.000 -Sample 13 = 1769.000 -Sample 14 = 1776.000 -Sample 15 = 1761.000 -Sample mean = 2119.062 -Vout mean (into ADC) = 1.293 V -Vsense = 34.534 mV -Current = 34.192 mA - -Printing ADC set of samples Nº1. -Sample 0 = 1695.000 -Sample 1 = 1721.000 -Sample 2 = 1695.000 -Sample 3 = 1692.000 -Sample 4 = 1697.000 -Sample 5 = 1702.000 -Sample 6 = 1692.000 -Sample 7 = 1697.000 -Sample 8 = 1698.000 -Sample 9 = 1688.000 -Sample 10 = 1695.000 -Sample 11 = 1740.000 -Sample 12 = 1701.000 -Sample 13 = 1690.000 -Sample 14 = 1703.000 -Sample 15 = 1691.000 -Sample mean = 1699.812 -Vout mean (into ADC) = 1.037 V -Vsense = 27.701 mV -Current = 27.427 mA - -Printing ADC set of samples Nº2. -Sample 0 = 1836.000 -Sample 1 = 1832.000 -Sample 2 = 1836.000 -Sample 3 = 1835.000 -Sample 4 = 1830.000 -Sample 5 = 1834.000 -Sample 6 = 1836.000 -Sample 7 = 1826.000 -Sample 8 = 1834.000 -Sample 9 = 1836.000 -Sample 10 = 1839.000 -Sample 11 = 1849.000 -Sample 12 = 1834.000 -Sample 13 = 1850.000 -Sample 14 = 1832.000 -Sample 15 = 1835.000 -Sample mean = 1835.875 -Vout mean (into ADC) = 1.120 V -Vsense = 29.919 mV -Current = 29.622 mA - -Printing ADC set of samples Nº3. -Sample 0 = 1876.000 -Sample 1 = 1882.000 -Sample 2 = 1875.000 -Sample 3 = 1890.000 -Sample 4 = 1873.000 -Sample 5 = 1887.000 -Sample 6 = 1873.000 -Sample 7 = 1873.000 -Sample 8 = 1878.000 -Sample 9 = 1872.000 -Sample 10 = 1874.000 -Sample 11 = 1888.000 -Sample 12 = 1883.000 -Sample 13 = 1877.000 -Sample 14 = 1879.000 -Sample 15 = 1880.000 -Sample mean = 1878.750 -Vout mean (into ADC) = 1.146 V -Vsense = 30.617 mV -Current = 30.314 mA - -Printing ADC set of samples Nº4. -Sample 0 = 1909.000 -Sample 1 = 1904.000 -Sample 2 = 1907.000 -Sample 3 = 1905.000 -Sample 4 = 1906.000 -Sample 5 = 1900.000 -Sample 6 = 1909.000 -Sample 7 = 1898.000 -Sample 8 = 1910.000 -Sample 9 = 1909.000 -Sample 10 = 1911.000 -Sample 11 = 1910.000 -Sample 12 = 1908.000 -Sample 13 = 1905.000 -Sample 14 = 1908.000 -Sample 15 = 1910.000 -Sample mean = 1906.812 -Vout mean (into ADC) = 1.164 V -Vsense = 31.075 mV -Current = 30.767 mA - -Printing ADC set of samples Nº5. -Sample 0 = 1907.000 -Sample 1 = 1922.000 -Sample 2 = 1907.000 -Sample 3 = 1913.000 -Sample 4 = 1911.000 -Sample 5 = 1909.000 -Sample 6 = 1911.000 -Sample 7 = 1909.000 -Sample 8 = 1907.000 -Sample 9 = 1954.000 -Sample 10 = 1912.000 -Sample 11 = 1898.000 -Sample 12 = 1907.000 -Sample 13 = 1899.000 -Sample 14 = 1908.000 -Sample 15 = 1925.000 -Sample mean = 1912.437 -Vout mean (into ADC) = 1.167 V -Vsense = 31.166 mV -Current = 30.858 mA - -Printing ADC set of samples Nº6. -Sample 0 = 1903.000 -Sample 1 = 1905.000 -Sample 2 = 1908.000 -Sample 3 = 1906.000 -Sample 4 = 1903.000 -Sample 5 = 1906.000 -Sample 6 = 1909.000 -Sample 7 = 1904.000 -Sample 8 = 1903.000 -Sample 9 = 1902.000 -Sample 10 = 1905.000 -Sample 11 = 1896.000 -Sample 12 = 1914.000 -Sample 13 = 1894.000 -Sample 14 = 1905.000 -Sample 15 = 1900.000 -Sample mean = 1903.937 -Vout mean (into ADC) = 1.162 V -Vsense = 31.028 mV -Current = 30.721 mA - -Printing ADC set of samples Nº7. -Sample 0 = 1895.000 -Sample 1 = 1903.000 -Sample 2 = 1894.000 -Sample 3 = 1890.000 -Sample 4 = 1891.000 -Sample 5 = 1898.000 -Sample 6 = 1896.000 -Sample 7 = 1901.000 -Sample 8 = 1891.000 -Sample 9 = 1888.000 -Sample 10 = 1899.000 -Sample 11 = 1916.000 -Sample 12 = 1897.000 -Sample 13 = 1896.000 -Sample 14 = 1890.000 -Sample 15 = 1899.000 -Sample mean = 1896.500 -Vout mean (into ADC) = 1.157 V -Vsense = 30.907 mV -Current = 30.601 mA - -Printing ADC set of samples Nº8. -Sample 0 = 1887.000 -Sample 1 = 1886.000 -Sample 2 = 1885.000 -Sample 3 = 1881.000 -Sample 4 = 1885.000 -Sample 5 = 1892.000 -Sample 6 = 1886.000 -Sample 7 = 1907.000 -Sample 8 = 1889.000 -Sample 9 = 1898.000 -Sample 10 = 1889.000 -Sample 11 = 1886.000 -Sample 12 = 1889.000 -Sample 13 = 1898.000 -Sample 14 = 1880.000 -Sample 15 = 1883.000 -Sample mean = 1888.812 -Vout mean (into ADC) = 1.153 V -Vsense = 30.781 mV -Current = 30.477 mA - -Printing ADC set of samples Nº9. -Sample 0 = 1867.000 -Sample 1 = 1860.000 -Sample 2 = 1869.000 -Sample 3 = 1866.000 -Sample 4 = 1863.000 -Sample 5 = 1869.000 -Sample 6 = 1870.000 -Sample 7 = 1870.000 -Sample 8 = 1871.000 -Sample 9 = 1869.000 -Sample 10 = 1868.000 -Sample 11 = 1880.000 -Sample 12 = 1871.000 -Sample 13 = 1867.000 -Sample 14 = 1870.000 -Sample 15 = 1862.000 -Sample mean = 1868.250 -Vout mean (into ADC) = 1.140 V -Vsense = 30.446 mV -Current = 30.145 mA - -Printing ADC set of samples Nº9. -Sample 0 = 1867.000 -Sample 1 = 1860.000 -Sample 2 = 1869.000 -Sample 3 = 1866.000 -Sample 4 = 1863.000 -Sample 5 = 1869.000 -Sample 6 = 1870.000 -Sample 7 = 1870.000 -Sample 8 = 1871.000 -Sample 9 = 1869.000 -Sample 10 = 1868.000 -Sample 11 = 1880.000 -Sample 12 = 1871.000 -Sample 13 = 1867.000 -Sample 14 = 1870.000 -Sample 15 = 1862.000 -Sample mean = 1868.250 -Vout mean (into ADC) = 1.140 V -Vsense = 30.446 mV -Current = 30.145 mA diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc deleted file mode 100644 index e2217331f..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/FastADCC.nc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define SAMPLES 16 - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - uint16_t adb[SAMPLES]; - uint8_t count = 0; - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A2, - //sref: REFERENCE_VREFplus_VREFnegterm, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_8_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void uwait(uint32_t u); - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureMultipleRepeat(); - - event void Boot.booted(){ - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureMultipleRepeat(); - } - //printf("Starting the ADC...\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - //if(count<20){ - printadb(); - // count++; - // } - // else - // return NULL; - // uwait(1024*6); - call Leds.led2Toggle(); - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } -//functions - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - float Vsense = 0; - float Rsense = 1.01; - //printf("Sample,Vin(V)\n"); - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printfFloat((float) adb[i]); - //printf(","); - Vout = adb[i]*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf("\n"); - } - mean = mean/SAMPLES; - //printf("Sample mean ="); - //printfFloat(mean); - //printf("\n"); - // printf("Mean(V),Vsense(mV),Current(mA),Current(mA)\n"); - //printf("Vout corrected with \" ((float)((uint8_t)(Vout*100)))/100 \" = "); - Vout = mean*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printf("Mean Voltage: "); - printfFloat(Vout); - printf("\n"); - /* - Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - //printf("Vsense ="); - printfFloat(Vsense); - printf(","); - - Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - printfFloat(Current); - printf(","); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - printfFloat(Current); - //printf(" mA\n"); - //printf("\n"); - printf("\n");*/ - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2, f3; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - f3 = f*10000;f3 %= 10; - printf("%ld.%d%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2, (uint8_t) f3); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureMultipleRepeat(){ - error_t e; - //printf("Configure multipleRepeat\n"); - e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcCurrent1MHz.csv deleted file mode 100644 index add09c2b9852a8eee9f5b4caca5bd7f0fc189b37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6801 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 diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/MultipleRepeat/MultipleRepeat-mean/readings/adcErrorVREFneg.csv deleted file mode 100644 index cba180b4056262c846eb6e9706bde2e87fa8593f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6164 zcmb`LJ8#@D5QJ0fm)O7|;7hMENbM@X^)6Hdh!26C{QpQ?0lJSyCZytPc#B=`&W?r; z>C?C8m!ChD%k}&1;riH(pWXVqxOGUO+lJk8u8W7|rv{(Dn>fzJ#Iq&*0mcn7CnKMh z=dIDp^=-MmE!)4Zzh7UM+pmY0FZiEx`mj+EQ*Xm=g^r}L2iBv-NM(hiKOc(6k`7-; zvUe4!kPSzLICO2Cxp^Zi49Nz+4+UqeJ{|Sa)G5^D>`qy$B*~eIq>q+b0*qumT5X)| zIt!+=U^)w>&d3>iCo)FT*B@L*SExtLV}Hy^OJz~0+crYt{Zviz8Jwho2Ph)gMq z{ZWz3!u~jqKF*`XdGslk7}?0#lviW4wHa+~M$H-P)my3u#nQ*{qHs2H7B|k^oXK*t z9gedrbf!=%pTenpDyLF8nXlgq8ab<4n+m7uPx10GKBe7yUn6IE^Y^{&XT9xbeYrMO zb=5oPDR$5LSY16^YLN39IjhncD=1{DcQVMFsv|~n#i@D3sUjOWvopZwZ7p~^1AM8o z`M4$Y1W-I6n|Bl^x(_%F_?UN{v_)jN?fOTDG^!YpSQY}8rRWuqRMTAR$G^r^U3K60k? z$t;bWna=*PpRrpaQ#w2AV?Cua_D*Cx?p2mH&g^;-?f8uQXO8uQmimB3WbBU?ak4)~ zs+`QidGVO&=f3z_!cbMdkuw{ygmH^X7S^t diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc deleted file mode 100644 index 84806b6bb..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCAppC.nc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - - -configuration FastADCAppC { } - -implementation { - - components MainC, FastADCC as App; - App -> MainC.Boot; - - components LedsC; - App.Leds -> LedsC; - - components new Msp430Adc12ClientAutoRVGC() as Fadc; - App.overflow -> Fadc; - App.adc -> Fadc; - App.Resource -> Fadc; - Fadc.AdcConfigure -> App.AdcConfigure; - components SerialPrintfC; - - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc deleted file mode 100644 index a897ef06f..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/FastADCC.nc +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Simple test application to test ADC - * Single ADC channel doing repeated conversions - * @author: João Gonçalves - */ - -#include "Timer.h" -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -module FastADCC{ - provides { - interface AdcConfigure as AdcConfigure; - } - uses interface Boot; - uses interface Leds; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource; - -} - -implementation{ - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - -//prototypes - void showerror(); - error_t configureSingleRepeat(); - void printfFloat(float toBePrinted); - - - event void Boot.booted(){ - printf("Booting...\n"); - call Resource.request(); - } - - event void Resource.granted(){ - error_t e = FAIL; - printf("Resource Granted\n"); - while(e != SUCCESS){ - e = configureSingleRepeat(); - } - printf("Starting 1st conversion\n"); - if(call adc.getData() != SUCCESS) - printf("Conversion didn't start!\n"); - } - - async event error_t adc.singleDataReady(uint16_t data){ - float voltage = 0; - printf("Sample: %d\nVoltage: ", data); - voltage = data*2.5/4095; - printfFloat(voltage); - return SUCCESS; - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - } - -//functions - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d\n", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureSingleRepeat(){ - error_t e; - printf("Configure singleRepeat\n"); - e = call adc.configureSingleRepeat(&adcconfig, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/Makefile b/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/Makefile deleted file mode 100644 index 535593717..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/AdcTest/SingleChannel/SingleRepeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -COMPONENT=FastADCAppC -#CFLAGS += -DPRINTFUART_ENABLED -#CFLAGS += -DADC12_ONLY_WITH_DMA -# already defined in msp430/adc12/Msp430Adc12.h -#CFLAGS += -DADC12_TIMERA_ENABLED - -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/Makefile deleted file mode 100644 index 95184a0aa..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=MicaTaskC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskC.nc deleted file mode 100644 index da1aeb47d..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskC.nc +++ /dev/null @@ -1,26 +0,0 @@ -configuration MicaTaskC { -} -implementation { - components MainC; - components LedsC; - components MicaTaskP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskP.nc deleted file mode 100644 index e28f400cc..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Micaz/MicaTaskP.nc +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include "../RadioAdc/Radio.h" - -module MicaTaskP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - bool up = TRUE; - uint16_t missedDeadlines = 0; - uint16_t metDeadlines = 0; - uint16_t deadline = 100; //now using this one instead of the one in radio.h - uint16_t iterations = 100; //now using this one instead of the one in radio.h - uint16_t numRequest = 0; //serves as a counter for rasing or lowering the iteration number - uint16_t requestNum = 0;//count the number of requests so far - //prototypes - error_t MicaSendMsg(uint8_t state); - - event void Boot.booted() { - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer1.startPeriodic(PERIOD); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MoteISTMsg)) { - mist_m = (MoteISTMsg*)payload; - if(mist_m->nodeid == MOTEIST_NODE_ID){ - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return 0; - } - micaz_m->nodeid = MICA_NODE_ID; //assign Micaz ID - micaz_m->task_i = iterations; - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - - switch (mist_m->state){ - case REQUEST: // MoteIST ready for start - micaz_m->state = START; - break; - case STARTED: // MoteIST has started - call Timer0.startOneShot(deadline); - return msg; // At this point don't need to send msg to MoteIST, return - case DEADLINE_MET: - call Timer0.stop(); //stop timer, deadline is met - call Leds.led1Toggle(); - micaz_m->met = ++metDeadlines; - micaz_m->state = DEADLINE_MET; - break; - case DEADLINE_MISS: // MoteIST missed the deadline, too bad.. but nothing to do here - return msg; - default: - } - if(call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - - - event void Timer0.fired(){ //deadline Reached - missedDeadlines++; - call Leds.led0Toggle(); - MicaSendMsg(DEADLINE_MISS); - } - - event void Timer1.fired(){ //make new request - requestNum++; - MicaSendMsg(REQUEST); - numRequest++; - - if(numRequest>3){ - switch(up){ - case TRUE: - if(iterations < ITERATIONS) - iterations += 200; - else{ - up = FALSE; - return; - } - break; - case FALSE: - if(iterations > 200) - iterations -= 200; - else{ - call Timer1.stop(); - return; - } - break; - default: - } - numRequest=0; - } - } - - //functions - error_t MicaSendMsg(uint8_t state){ - - MicaMsg* micaz_m; - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return FAIL; - } - micaz_m->nodeid = MICA_NODE_ID; - micaz_m->request = requestNum; - micaz_m->task_i = iterations; // 0 for deadline miss - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - micaz_m->state = state; - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - } - return SUCCESS; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Makefile deleted file mode 100644 index ac59737e3..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=RadioAdcC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Radio.h b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Radio.h deleted file mode 100644 index 67f949c95..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/Radio.h +++ /dev/null @@ -1,43 +0,0 @@ -#define MOTEIST_NODE_ID 1 //for MoteIST -#define MICA_NODE_ID 2 -#define ITERATIONS 5000 -#define DEADLINE 100 -#define PERIOD 200 - - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1000, - DEADLINE_MISS = 4, - DEADLINE_MET = 3, - STARTED = 2, - START = 1, - REQUEST = 0 -}; - -typedef nx_struct MicaMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t request; - nx_uint8_t state; // state of operation - nx_uint16_t task_i; //number of iterations to perform the task: passing 0 means deadline missed - nx_uint16_t deadline; //deadline for the task: passing 0 means this is a request to start - nx_uint16_t missed; //number of missed deadlines so far - nx_uint16_t met; - -} MicaMsg; - -typedef nx_struct MoteISTMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t state; -} MoteISTMsg; - - -/* - * The MicaMsg struct - * - * parameter @state has the state of mica's operation such as: - * 0 - requesting - * 1 - start order - * 2 - deadline met - * 3 - deadline missed - */ diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcC.nc deleted file mode 100644 index 375839c82..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcC.nc +++ /dev/null @@ -1,44 +0,0 @@ -#include - -configuration RadioAdcC { -} -implementation { - components MainC; - components LedsC; - components RadioAdcP as App; - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //timers - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //Frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcP.nc deleted file mode 100644 index 94190a013..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioAdc/RadioAdcP.nc +++ /dev/null @@ -1,308 +0,0 @@ -#include -#include -#include "Radio.h" -#include "Msp430Adc12.h" - - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif -#define MAX_FREQUENCY_INCREASE 5000000 -#define MAX_FREQUENCY 25000000 -#define START_FREQUENCY 25000000 -#define SAMPLES 16 - -module RadioAdcP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; - uses interface FreqControl; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - uint32_t ActFrequency = 0; - uint16_t deadline; - uint16_t requestNum; - - uint16_t adb[SAMPLES]; - bool AdcDone = FALSE; - - //prototypes - void print(uint16_t iterations, uint32_t elapsedTime, error_t status); - void showerror(); - error_t configureAdc(); - - error_t SendMsgTaskDone(); - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus); - void uwait(uint32_t u); - void printfFloat(float toBePrinted); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - - event void Boot.booted() { - printf("Iterations,Deadline,Frequency,ElapsedTime,Current,Voltage,Status\n"); - - if(call FreqControl.setMCLKFreq(START_FREQUENCY) == SUCCESS){ - ActFrequency = START_FREQUENCY; - //printf("Frequency at %lu Hz\n", ActFrequency); - //request the adc - call AdcResource.request(); - } - else - printf("err: Could not set Start Frequency\n"); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - call adc.getData(); - uwait(1024*5); - atomic if(AdcDone){ - print(0, 0, 0); - AdcDone=FALSE; - } - call AMControl.start(); //start radio - } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { /*printf("Radio started\n");*/} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - //printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - //printf("Mica: START.\niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - requestNum = micaz_m->request; - deadline = micaz_m->deadline; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - //printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - //printf("Mica: DEADLINE_MISS:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - call adc.getData(); - - if(status == SUCCESS) - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - - AdaptFrequency(elapsedTime, status); - - atomic if(AdcDone){ - print(iterations, elapsedTime, status); - AdcDone=FALSE; - } - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } - - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus){ - uint32_t newFreq; - float deadlineWindow; - deadlineWindow = deadline - deadline * 0.5; - //printf("Task done! Elapsed: %lu, status: %d\n", elapsedTime, taskStatus); - //printf("Act Freq is %lu Hz\n", ActFrequency); - - if(taskStatus!=SUCCESS) - newFreq = ActFrequency + MAX_FREQUENCY_INCREASE; - else{ - //ajust to finish in 20% less time of deadline - newFreq = (uint32_t) ( (((float) elapsedTime) / deadlineWindow) * ((float) ActFrequency) ); - newFreq = (newFreq/100000)*100000; //round frequency to hundreads of kHz - } - if(newFreq == ActFrequency || newFreq < 700000) - return FAIL; - - if(newFreq > MAX_FREQUENCY) - newFreq = MAX_FREQUENCY; - - if(call FreqControl.setMCLKFreq(newFreq)==SUCCESS) - ActFrequency = newFreq; - //set new frequency to the one needed in order to meet the deadline in half its time with a 20% window - //printf("New Freq is %lu Hz\n", ActFrequency); - return SUCCESS; - } - - void print(uint16_t iterations, uint32_t elapsedTime, error_t status){ - uint8_t i; - float currentMean = 0; - float voltageMean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i+=2){ - currentMean += (float) adb[i]; - voltageMean += (float) adb[i+1]; - } - currentMean /= SAMPLES/2; //bits - voltageMean /= SAMPLES/2; // bits - currentMean *= refVolt/Nmax; //value in Volts - voltageMean *= refVolt/Nmax; //value in Volts - - currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2.92 to get total battery voltage - - printf("%d,%d,%d,%lu,%lu,%d,", requestNum, iterations, deadline, ActFrequency, elapsedTime, status); - printfFloat(currentMean); - printf(","); - printfFloat(voltageMean); - printf("\n"); - } - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc deleted file mode 100644 index 5684c8d96..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestAppC.nc +++ /dev/null @@ -1,35 +0,0 @@ - -#include - -configuration DVSTestAppC { -} -implementation { - components MainC; - components LedsC; - components DVSTestP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //For tasks - components TasksC; - App.Tasks -> TasksC; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc deleted file mode 100644 index 9d962687a..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/DVSTestP.nc +++ /dev/null @@ -1,140 +0,0 @@ -#include -#include -#include "Radio.h" - -#define ADC_SAMPLE_TIME 10 //miliseconds - -module DVSTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - - // prototypes - error_t SendMsgTaskDone(); - - - event void Boot.booted() { - //call Timer0.startPeriodic(ADC_SAMPLE_TIME); - printf("Booted\n"); - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) {} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - printf("Mica: START. \niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - state = STARTED; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - printf("Mica: DEADLINE_MISS\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile deleted file mode 100644 index aabeeeb4e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSTestAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile deleted file mode 100644 index 95184a0aa..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=MicaTaskC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc deleted file mode 100644 index da1aeb47d..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskC.nc +++ /dev/null @@ -1,26 +0,0 @@ -configuration MicaTaskC { -} -implementation { - components MainC; - components LedsC; - components MicaTaskP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc deleted file mode 100644 index dabe3d352..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Micaz/MicaTaskP.nc +++ /dev/null @@ -1,127 +0,0 @@ -#include -#include "../Radio.h" - -module MicaTaskP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t missedDeadlines = 0; - uint16_t metDeadlines = 0; - uint8_t deadline = 100; //now using this one instead of the one in radio.h - - //prototypes - error_t MicaSendMsg(uint8_t state); - - event void Boot.booted() { - call AMControl.start(); //start radio - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer1.startPeriodic(PERIOD); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MoteISTMsg)) { - mist_m = (MoteISTMsg*)payload; - if(mist_m->nodeid == MOTEIST_NODE_ID){ - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return 0; - } - micaz_m->nodeid = MICA_NODE_ID; //assign Micaz ID - micaz_m->task_i = ITERATIONS; - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - - switch (mist_m->state){ - case REQUEST: // MoteIST ready for start - micaz_m->state = START; - break; - case STARTED: // MoteIST has started - call Timer0.startOneShot(deadline); - return msg; // At this point don't need to send msg to MoteIST, return - case DEADLINE_MET: - call Timer0.stop(); //stop timer, deadline is met - call Leds.led1Toggle(); - micaz_m->met = ++metDeadlines; - micaz_m->state = DEADLINE_MET; - break; - case DEADLINE_MISS: // MoteIST missed the deadline, too bad.. but nothing to do here - call Leds.led0Toggle(); - return msg; - default: - } - if(call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - - - event void Timer0.fired(){ //deadline Reached - missedDeadlines++; - MicaSendMsg(DEADLINE_MISS); - } - - event void Timer1.fired() { //make new request - MicaSendMsg(REQUEST); - } - - //functions - error_t MicaSendMsg(uint8_t state){ - - MicaMsg* micaz_m; - if (!busy) { //check if radio is busy - micaz_m = (MicaMsg*)(call Packet.getPayload(&pkt, sizeof(MicaMsg))); - if (micaz_m == NULL){ - return FAIL; - } - micaz_m->nodeid = MICA_NODE_ID; - micaz_m->task_i = ITERATIONS; // 0 for deadline miss - micaz_m->deadline = deadline; - micaz_m->missed = missedDeadlines; - micaz_m->met = metDeadlines; - micaz_m->state = state; - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MicaMsg)) == SUCCESS) { - busy = TRUE; - } - } - return SUCCESS; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h deleted file mode 100644 index 8d77f02ae..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Radio.h +++ /dev/null @@ -1,42 +0,0 @@ -#define MOTEIST_NODE_ID 1 //for MoteIST -#define MICA_NODE_ID 2 -#define ITERATIONS 200 -#define DEADLINE 500 //0.1 sec -#define PERIOD 1000 //1 sec - - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1000, - DEADLINE_MISS = 4, - DEADLINE_MET = 3, - STARTED = 2, - START = 1, - REQUEST = 0 -}; - -typedef nx_struct MicaMsg { - nx_uint16_t nodeid; //node id - nx_uint8_t state; // state of operation - nx_uint8_t task_i; //number of iterations to perform the task: passing 0 means deadline missed - nx_uint16_t deadline; //deadline for the task: passing 0 means this is a request to start - nx_uint16_t missed; //number of missed deadlines so far - nx_uint16_t met; - -} MicaMsg; - -typedef nx_struct MoteISTMsg { - nx_uint16_t nodeid; //node id - nx_uint16_t state; -} MoteISTMsg; - - -/* - * The MicaMsg struct - * - * parameter @state has the state of mica's operation such as: - * 0 - requesting - * 1 - start order - * 2 - deadline met - * 3 - deadline missed - */ diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc deleted file mode 100644 index e456e577b..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/Tasks.nc +++ /dev/null @@ -1,24 +0,0 @@ -interface Tasks{ - - /* - * Calculates the fibonacci sequence numbers to the number of the parameter iterations. - * The param deadline is the deadline in miliseconds. - */ - - error_t command getFibonacci(uint16_t iterations, uint32_t deadline); - - /* - *this event is used for each iteration done in TasksP - */ - - event void FibonacciIterationDone(void); - /* - *This signals the stop of the interations for the fibonacci sequence numbers - * returns - * num_iterations: the remanining iterations at the time the event was signaled, if any. - * actualTime: the actual time the event was signaled - * status: FAIL if it missed the deadline - * SUCCESS if it has finished before deadline - */ - event void FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status); -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc deleted file mode 100644 index 3e6dfa33b..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksC.nc +++ /dev/null @@ -1,11 +0,0 @@ -configuration TasksC { - provides interface Tasks; -} -implementation { - - components TasksP, SerialPrintfC; - Tasks = TasksP.Tasks; - - components new TimerMilliC() as Timer0; - TasksP.Timer0 -> Timer0; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc deleted file mode 100644 index b71794524..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/TasksP.nc +++ /dev/null @@ -1,75 +0,0 @@ - -#define FIBONACCI_A 0 -#define FIBONACCI_B 1 - -module TasksP { - uses interface Timer as Timer0; - provides interface Tasks; - uses interface Tasks as TaskDone; -} -implementation { - - uint32_t a = FIBONACCI_A; - uint32_t b = FIBONACCI_B; - uint32_t i = 0; - uint32_t sum = 0; - uint16_t num_iterations; - uint32_t time_deadline; - bool deadline_miss=0; - //tasks - task void fibonacci(void){ - /** - * Here is the single iteration. - * On each iteration it performs the parameter @iterations is decremented. - * - */ - // printf("N=%d, %lu\n", num_iterations, a); - sum = a + b; - a = b; - b = sum; - //signal iteration done - num_iterations--; - signal TaskDone.FibonacciIterationDone(); - } - - //commands - command error_t Tasks.getFibonacci(uint16_t iterations, uint32_t deadline){ - num_iterations = iterations; - time_deadline = deadline; - - call Timer0.startOneShot(deadline); - - //printf("Posted fibonacci\nIterations:%d, deadline: %lu\n",num_iterations, time_deadline); - post fibonacci(); - - return SUCCESS; - } - - //events - event void TaskDone.FibonacciIterationDone(){ - uint32_t t0, now; - if(num_iterations && !deadline_miss) - post fibonacci(); - else{ - if(!deadline_miss){ - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - signal Tasks.FibonacciDone(num_iterations, now-t0, SUCCESS); - } - } - } - - event void Timer0.fired() { - //deadline missed! - uint32_t now,t0; - deadline_miss = 1; - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - signal Tasks.FibonacciDone(num_iterations, now-t0, FAIL); - } - - event void TaskDone.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fib deleted file mode 100755 index 27f8df5405ecbc675bdb1da328523abe0191556c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7253 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 diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c deleted file mode 100644 index 50c793c7f..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioConstFrequencyNoAdc/Tasks/fibonacci/fibonacci.c +++ /dev/null @@ -1,69 +0,0 @@ -/** - * You'll notice that we need to include a header file that - * contains functions we need to use. Being a compiled language, - * it's inefficient to include functions that aren't needed. - * stdio.h contains functions for reading from and writing to the console - */ - -#include - -/** - * In C, the program executes the main function. You should also take note - * that we must declare a return type for the function. In this case, it's - * an integer, and we return 0 to indicate successful completion of the - * program. - */ - -int fibonacci(unsigned long int n); - -int main () -{ - /* Notice that we need to declare our variables, and their type */ - - unsigned long int n; - - /* printf prints a formated string to the stdout */ - - printf("\nHow many numbers of the sequence would you like?\n"); - - /* scanf reads a formated string from the stdin. We are expecting an integer here. */ - - scanf("%d",&n); - - /* Here we call the fibonacci function */ - - fibonacci(n); - - /* Finally, return 0 */ - - return 0; -} - -/** - * This is the simple fibonacci sequence generator. Notice also, we - * declare the type of variable we expect to be passed to the function. - */ - -int fibonacci(unsigned long int n) -{ - /** - * Here we declare and set our variables. - */ - long unsigned int a = 0; - long unsigned int b = 1; - long unsigned int sum; - int i; - - /** - * Here is the standard for loop. This will step through, performing the code - * inside the braces until i is equal to n. - */ - for (i=0;ib~zjlp_5aT2%`F|%iYMlTxlAGPq;;m*dW%4 zm8hbw@gz79*#M1Jpw0y;p$@ol7<$MWUC^> zymdm_rQQje4|*STlqp~e{h|%Z9<%x4lgm?VYF%#}Y;+9SMtpR4ifkf=-4_?+?Zj zVs}S-bBnPhpe#Fa2lUB-AIFTsR2GYs^6r`y6myu{l_Y-O<-QNOi#cxI%^ZVsD0kyv zcGguO{mAfS?Rp{d-}u0?tdTd&6@?9`EnMa07TSF7$g7jq)?4V&+VlagY-4R=&rud{ zUPCi$6D>rkyE!E>Ek)_x%?V%<8~$=E_lNBDxhK23q5~t)p2X$A;pla&m%>?)=1(t5 zwvQ)2?L${0^Z1w_`PpiCFg#O<>-js*?2Kc_bb7<+&)I)=!ZA*YRXIYnr0qvprN=(&%RkN&f>)ni_8M<&dQS6GL_{g+*S)>%`pPM#*``W%L;cBUa; zx(EH_*H_~D%f8;;-rV$iZ@>P2Zu1ejFYMk!d_UKTq z+wWCIPOvc6iaN)ISLzY;P`Pq0f5G|(n$zigsca!#x}BREC-?FSYB<)?f@4DYL1$?C z%3aHnGm*Vmdn7k|bn;$EU@n%<-)9dWEOer);mH_QUUt@7*a+LBXRC1oqgh@zUp{X+ zM=aCd@NT}XEZ6FH=i5BUT=_OPe6_y$Q?jy`96Ro&exJSQJ#x%AI+^$SVb_koF+NAL zw=8qbS(bWFXJ=g2RK5gNnRyjd3)}+l3+w61TCAPN;L1~2JA4*7ur@aZ8pG5tr{xh? z9)aZ%SRR4p5m+99N@;oI`>cdg{h z$oU=Sho0YiZvuY^c?aaf5Vo&^FmWF>j~y7l;i@70Cgdmf1CTRl&+-e%`CY~hCcm4R zV@H`hfqM9sq)&6m2Y^xhpA)~Cbt5OfTPh$Qh3L96d|Axl26nf!e9BjIs3(&!Grq<^ zW8jgx#*9Q;H!CbeAU)J?278d3DV0Zc3EzT|)PM*il4c~()ZAWY2K#K(m&gQqGBJEZ z$HF2&6b+`MA`l)*pg)zHDW!Qfl1j&tiABJGE)|KBuL=WkQv_m(7_Mey5Z7J+sFLBJ z85Ds?)aXqG`y(O{GLxw^45;ks5IRC9!TwkX29juqOF;IfTK1&D4ki2hBMDQF&wrDz z1Bvs*d6wrO0GvymsAJj)xer2~Jg+f)C|lyMW@0kozIzaoxOt0s~q1$9pBt zLNt%->p7QCHQ*oi#K*CCq6GqrjQ z(iL!Z;@B~L8=`r9zIfn(S8CKn+x@Q1V;42x)qqF;b<(^aqJsUAw;jCg;AtJXy8IH# zb<(SzI|?hye7-2GEbuv^uo@jcFBImJMm-l4=8UTK zudtd;{hlhZBa7=<>A51+x>cA@0`(qLm`@(H4i)xD%=MZJZ*}xBs`9OgMJBe4SZDuH!8 z5U(q`As;xOSb{$T%=qAV@T|KHSjSHVPVV;t^Q=$l*NS~b?HMgk1J@R{A7XpkzcTpu zJTOlTb^EUX^E^@EYVlRzGMiuStQOw_=IJoH7Uj-0;tVj4m^p8}AHJt`qWw$2-UWN_ zSZ@IHELPj&`??0ll5A6k@&7IGap*68lJ~n-{BBA6KLWpH&tHXemADPeV@=)P9bley zKZl(D@L|RGB>S(xE_o#|4_o#9iBQT+o0;C;KnVW}v~+iN86E8hyYVlAVYDtnPqY-N z!bzhqp6m(64Y^Y@f|)^qUD!Z8Vn)J&N9(sV2r7(Nc#!B3A-8u%IMd%hr0ulrZ - -int a=10000,b,c=2800,d,e,f[2801],g; -int main(void){ - for(;b-c;)f[b++]=a/5; - for(;d=0,g=c*2;c-=14, printf("%.4d",e+d/a),e=d%a) - for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b); - return 0; - } diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc deleted file mode 100644 index 0e8bc5212..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestAppC.nc +++ /dev/null @@ -1,39 +0,0 @@ - -#include - -configuration DVSTestAppC { -} -implementation { - components MainC; - components LedsC; - components DVSTestP as App; - - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components SerialPrintfC; - - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - - //For tasks - components TasksC; - App.Tasks -> TasksC; - - //for Radio - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; - - //for frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestP.nc deleted file mode 100644 index 3e300862e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/DVSTestP.nc +++ /dev/null @@ -1,180 +0,0 @@ -#include -#include -#include "Radio.h" - -#define MAX_FREQUENCY_INCREASE 5000000 -#define MAX_FREQUENCY 25000000 -#define START_FREQUENCY 25000000 - -module DVSTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Tasks; - - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; - uses interface FreqControl; -} -implementation { - - message_t pkt; - bool busy = FALSE; - uint16_t state; - uint32_t ActFrequency = 0; - uint16_t deadline; - // prototypes - error_t SendMsgTaskDone(); - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus); - - event void Boot.booted() { - printf("Booted\n"); - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - if(call FreqControl.setMCLKFreq(START_FREQUENCY) == SUCCESS){ - ActFrequency = START_FREQUENCY; - printf("Frequency at %lu Hz\n", ActFrequency); - call AMControl.start(); //start radio - } - else - printf("err: Could not set Start Frequency\n"); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { printf("Radio started\n");} - else - call AMControl.start(); - } - - event void AMControl.stopDone(error_t err) { - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) - busy = FALSE; - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - MoteISTMsg* mist_m; - MicaMsg* micaz_m; - - if (len == sizeof(MicaMsg)) { - micaz_m = (MicaMsg*)payload; - /* - * Check if message comes from Mica1 and if it is a request to start the processing (task != 0) - */ - if(micaz_m->nodeid == MICA_NODE_ID){ - //printf("Incoming msg from mica\n"); - if (!busy) { //check if radio is busy - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - return 0; - } - mist_m->nodeid = MOTEIST_NODE_ID; //assign MoteIST ID - state = micaz_m->state; - switch(micaz_m->state){ - - case REQUEST: - printf("Mica: REQUEST\n\n"); - mist_m->state = REQUEST; - state = REQUEST; - break; - case START: - printf("Mica: START.\niterations=%d\ndeadline=%d\nmissed=%d\nmet=%d\n\n", micaz_m->task_i, micaz_m->deadline, micaz_m->missed, micaz_m->met); - mist_m->state = STARTED; - call Tasks.getFibonacci(micaz_m->task_i, micaz_m->deadline); - state = STARTED; - deadline = micaz_m->deadline; - break; - case DEADLINE_MET: - call Leds.led2Toggle(); - printf("Mica DEADLINE_MET:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - case DEADLINE_MISS: - call Leds.led1Toggle(); - printf("Mica: DEADLINE_MISS:\nmissed=%d\nmet=%d\n\n", micaz_m->missed, micaz_m->met); - return msg; - break; - default: - break; - } - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS) { - busy = TRUE; - } - }//if !busy - }// if == MICA_NODE_ID - }// if len = len MicaMsg - return msg; - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - if(status == SUCCESS) - if(SendMsgTaskDone()!=SUCCESS) - call Timer0.startPeriodic(1); - AdaptFrequency(elapsedTime, status); - } - event void Tasks.FibonacciIterationDone(){ } - - event void Timer0.fired() { - if(SendMsgTaskDone()==SUCCESS) - call Timer0.stop(); - } - - event void Timer1.fired() {} - - - //functions - error_t SendMsgTaskDone(){ - MoteISTMsg* mist_m; - if (!busy) {//check if radio is busy - /*build the packet*/ - mist_m = (MoteISTMsg*)(call Packet.getPayload(&pkt, sizeof(MoteISTMsg))); - if (mist_m == NULL){ - printf("App: null pointer\n"); - return FAIL; - } - mist_m->state = DEADLINE_MET; // task done in time - state = DEADLINE_MET; - /*send the packet*/ - if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoteISTMsg)) == SUCCESS){ - busy = TRUE; - } - return SUCCESS; - } //if(!busy) - return FAIL; - } - - error_t AdaptFrequency(uint32_t elapsedTime, error_t taskStatus){ - uint32_t newFreq; - float deadlineWindow; - deadlineWindow = deadline - deadline * 0.5; - printf("Task done! Elapsed: %lu, status: %d\n", elapsedTime, taskStatus); - printf("Act Freq is %lu Hz\n", ActFrequency); - - if(taskStatus!=SUCCESS) - newFreq = ActFrequency + MAX_FREQUENCY_INCREASE; - else{ - //ajust to finish in 20% less time of deadline - newFreq = (uint32_t) ( (((float) elapsedTime) / deadlineWindow) * ((float) ActFrequency) ); - newFreq = (newFreq/100000)*100000; //round frequency to hundreads of kHz - } - if(newFreq == ActFrequency || newFreq < 700000) - return FAIL; - - if(newFreq > MAX_FREQUENCY) - newFreq = MAX_FREQUENCY; - - if(call FreqControl.setMCLKFreq(newFreq)==SUCCESS) - ActFrequency = newFreq; - //set new frequency to the one needed in order to meet the deadline in half its time with a 20% window - printf("New Freq is %lu Hz\n", ActFrequency); - return SUCCESS; - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/Makefile deleted file mode 100644 index aabeeeb4e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/RadioNoAdc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSTestAppC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/Tasks.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/Tasks.nc deleted file mode 100644 index 2e33e2092..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/Tasks.nc +++ /dev/null @@ -1,24 +0,0 @@ -interface Tasks{ - - /* - * Calculates the fibonacci sequence numbers to the number of the parameter iterations. - * The param deadline is the deadline in miliseconds. - */ - - error_t command getFibonacci(uint16_t iterations, uint32_t deadline); - - /* - *this event is used for each iteration done in TasksP - */ - - event void FibonacciIterationDone(void); - /* - *This signals the stop of the interations for the fibonacci sequence numbers - * returns - * num_iterations: the remanining iterations at the time the event was signaled, if any. - * actualTime: the actual time the event was signaled - * status: FAIL if it missed the deadline - * SUCCESS if it has finished before deadline - */ - event void FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status); -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksC.nc deleted file mode 100644 index 3e6dfa33b..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksC.nc +++ /dev/null @@ -1,11 +0,0 @@ -configuration TasksC { - provides interface Tasks; -} -implementation { - - components TasksP, SerialPrintfC; - Tasks = TasksP.Tasks; - - components new TimerMilliC() as Timer0; - TasksP.Timer0 -> Timer0; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksP.nc deleted file mode 100644 index dcbc13cac..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/TasksP.nc +++ /dev/null @@ -1,81 +0,0 @@ - -#define FIBONACCI_A 0 -#define FIBONACCI_B 1 - -module TasksP { - uses interface Timer as Timer0; - provides interface Tasks; - uses interface Tasks as TaskDone; -} -implementation { - - uint32_t a = FIBONACCI_A; - uint32_t b = FIBONACCI_B; - uint32_t i = 0; - uint32_t sum = 0; - uint16_t num_iterations; - uint16_t totalIterations; - uint32_t time_deadline; - bool deadline_miss=FALSE; - - //tasks - task void fibonacci(void){ - /** - * Here is the single iteration. - * On each iteration it performs the parameter @iterations is decremented. - * - */ - // printf("N=%d, %lu\n", num_iterations, a); - sum = a + b; - a = b; - b = sum; - //signal iteration done - num_iterations--; - signal TaskDone.FibonacciIterationDone(); - } - - //commands - command error_t Tasks.getFibonacci(uint16_t iterations, uint32_t deadline){ - deadline_miss = FALSE; - num_iterations = iterations; - totalIterations = iterations; - time_deadline = deadline; - - call Timer0.startOneShot(deadline); - - //printf("Posted fibonacci\nIterations:%d, deadline: %lu, deadline miss: %d\n",num_iterations, time_deadline, deadline_miss); - post fibonacci(); - - return SUCCESS; - } - - //events - event void TaskDone.FibonacciIterationDone(){ - uint32_t t0, now; - if(num_iterations && !deadline_miss) - post fibonacci(); - else{ - if(!deadline_miss){ - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - //printf("fibonacci is done in: %lu\n", now-t0); - signal Tasks.FibonacciDone(totalIterations, t0, now, SUCCESS); - } - } - } - - event void Timer0.fired() { - //deadline missed! - uint32_t now,t0; - deadline_miss = TRUE; - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - - // printf("timer fired in fibonacci: %lu\n", now-t0); - signal Tasks.FibonacciDone(num_iterations, now, t0, FAIL); - } - - event void TaskDone.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fib b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fib deleted file mode 100755 index 27f8df5405ecbc675bdb1da328523abe0191556c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7253 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 diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fibonacci.c b/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fibonacci.c deleted file mode 100644 index 50c793c7f..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/Tasks/fibonacci/fibonacci.c +++ /dev/null @@ -1,69 +0,0 @@ -/** - * You'll notice that we need to include a header file that - * contains functions we need to use. Being a compiled language, - * it's inefficient to include functions that aren't needed. - * stdio.h contains functions for reading from and writing to the console - */ - -#include - -/** - * In C, the program executes the main function. You should also take note - * that we must declare a return type for the function. In this case, it's - * an integer, and we return 0 to indicate successful completion of the - * program. - */ - -int fibonacci(unsigned long int n); - -int main () -{ - /* Notice that we need to declare our variables, and their type */ - - unsigned long int n; - - /* printf prints a formated string to the stdout */ - - printf("\nHow many numbers of the sequence would you like?\n"); - - /* scanf reads a formated string from the stdin. We are expecting an integer here. */ - - scanf("%d",&n); - - /* Here we call the fibonacci function */ - - fibonacci(n); - - /* Finally, return 0 */ - - return 0; -} - -/** - * This is the simple fibonacci sequence generator. Notice also, we - * declare the type of variable we expect to be passed to the function. - */ - -int fibonacci(unsigned long int n) -{ - /** - * Here we declare and set our variables. - */ - long unsigned int a = 0; - long unsigned int b = 1; - long unsigned int sum; - int i; - - /** - * Here is the standard for loop. This will step through, performing the code - * inside the braces until i is equal to n. - */ - for (i=0;ib~zjlp_5aT2%`F|%iYMlTxlAGPq;;m*dW%4 zm8hbw@gz79*#M1Jpw0y;p$@ol7<$MWUC^> zymdm_rQQje4|*STlqp~e{h|%Z9<%x4lgm?VYF%#}Y;+9SMtpR4ifkf=-4_?+?Zj zVs}S-bBnPhpe#Fa2lUB-AIFTsR2GYs^6r`y6myu{l_Y-O<-QNOi#cxI%^ZVsD0kyv zcGguO{mAfS?Rp{d-}u0?tdTd&6@?9`EnMa07TSF7$g7jq)?4V&+VlagY-4R=&rud{ zUPCi$6D>rkyE!E>Ek)_x%?V%<8~$=E_lNBDxhK23q5~t)p2X$A;pla&m%>?)=1(t5 zwvQ)2?L${0^Z1w_`PpiCFg#O<>-js*?2Kc_bb7<+&)I)=!ZA*YRXIYnr0qvprN=(&%RkN&f>)ni_8M<&dQS6GL_{g+*S)>%`pPM#*``W%L;cBUa; zx(EH_*H_~D%f8;;-rV$iZ@>P2Zu1ejFYMk!d_UKTq z+wWCIPOvc6iaN)ISLzY;P`Pq0f5G|(n$zigsca!#x}BREC-?FSYB<)?f@4DYL1$?C z%3aHnGm*Vmdn7k|bn;$EU@n%<-)9dWEOer);mH_QUUt@7*a+LBXRC1oqgh@zUp{X+ zM=aCd@NT}XEZ6FH=i5BUT=_OPe6_y$Q?jy`96Ro&exJSQJ#x%AI+^$SVb_koF+NAL zw=8qbS(bWFXJ=g2RK5gNnRyjd3)}+l3+w61TCAPN;L1~2JA4*7ur@aZ8pG5tr{xh? z9)aZ%SRR4p5m+99N@;oI`>cdg{h z$oU=Sho0YiZvuY^c?aaf5Vo&^FmWF>j~y7l;i@70Cgdmf1CTRl&+-e%`CY~hCcm4R zV@H`hfqM9sq)&6m2Y^xhpA)~Cbt5OfTPh$Qh3L96d|Axl26nf!e9BjIs3(&!Grq<^ zW8jgx#*9Q;H!CbeAU)J?278d3DV0Zc3EzT|)PM*il4c~()ZAWY2K#K(m&gQqGBJEZ z$HF2&6b+`MA`l)*pg)zHDW!Qfl1j&tiABJGE)|KBuL=WkQv_m(7_Mey5Z7J+sFLBJ z85Ds?)aXqG`y(O{GLxw^45;ks5IRC9!TwkX29juqOF;IfTK1&D4ki2hBMDQF&wrDz z1Bvs*d6wrO0GvymsAJj)xer2~Jg+f)C|lyMW@0kozIzaoxOt0s~q1$9pBt zLNt%->p7QCHQ*oi#K*CCq6GqrjQ z(iL!Z;@B~L8=`r9zIfn(S8CKn+x@Q1V;42x)qqF;b<(^aqJsUAw;jCg;AtJXy8IH# zb<(SzI|?hye7-2GEbuv^uo@jcFBImJMm-l4=8UTK zudtd;{hlhZBa7=<>A51+x>cA@0`(qLm`@(H4i)xD%=MZJZ*}xBs`9OgMJBe4SZDuH!8 z5U(q`As;xOSb{$T%=qAV@T|KHSjSHVPVV;t^Q=$l*NS~b?HMgk1J@R{A7XpkzcTpu zJTOlTb^EUX^E^@EYVlRzGMiuStQOw_=IJoH7Uj-0;tVj4m^p8}AHJt`qWw$2-UWN_ zSZ@IHELPj&`??0ll5A6k@&7IGap*68lJ~n-{BBA6KLWpH&tHXemADPeV@=)P9bley zKZl(D@L|RGB>S(xE_o#|4_o#9iBQT+o0;C;KnVW}v~+iN86E8hyYVlAVYDtnPqY-N z!bzhqp6m(64Y^Y@f|)^qUD!Z8Vn)J&N9(sV2r7(Nc#!B3A-8u%IMd%hr0ulrZ - -int a=10000,b,c=2800,d,e,f[2801],g; -int main(void){ - for(;b-c;)f[b++]=a/5; - for(;d=0,g=c*2;c-=14, printf("%.4d",e+d/a),e=d%a) - for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b); - return 0; - } diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc deleted file mode 100644 index c1a27ad20..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioC.nc +++ /dev/null @@ -1,32 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc deleted file mode 100644 index da2b47910..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/DVSnoRadioP.nc +++ /dev/null @@ -1,203 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 900 -#define DEADLINE 5000 -#define SAMPLES 16 - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - uint32_t Freq = 1000000; - uint32_t ActFreq = 0; - uint32_t EndFreq = 25000000; - uint32_t Step = 500000; - uint32_t timeStart = 0; - uint32_t timeEnd = 0; - uint16_t Number = 0; - bool AdcDone = FALSE; - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - void frequency_sweep(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Adc is configured, now init the system - */ - printf("Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit)\n"); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else - atomic ActFreq = Freq; - - call adc.getData(); - - uwait(1024*5); - atomic if(AdcDone){ - printadb(); - AdcDone=FALSE; - } - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ - atomic timeEnd = startTime; - atomic timeStart = endTime; - - if(Freq=EndFreq){ - call Leds.led2On(); - return; - } - } - - event void Tasks.FibonacciIterationDone(){ - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - - } - - -//functions - void printadb(){ - uint8_t i; - uint32_t currentMean = 0; - uint32_t voltageMean = 0; - //float Gain = 37.5; //(Gm*Rout) - //float refVolt = 2.5; - //float Nmax = 4095; - //float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i+=2){ - currentMean += adb[i]; - voltageMean += adb[i+1]; - } - currentMean /= SAMPLES/2; //bits - voltageMean /= SAMPLES/2; // bits - //currentMean *= refVolt/Nmax; //value in Volts - //voltageMean *= refVolt/Nmax; //value in Volts - - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - - printf("%d,%lu,%lu,%lu,%lu\n", Number, ActFreq, timeEnd, currentMean, voltageMean); - } - - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/test.txt b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/test.txt deleted file mode 100644 index 98d693eac..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/2Channels/test.txt +++ /dev/null @@ -1,165 +0,0 @@ -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,25000000,0,80,1137 -2,24000000,580,462,1263 -3,23500000,594,613,1467 -4,23000000,608,597,1438 -5,22500000,623,593,1414 -6,22000000,638,589,1402 -7,21500000,653,585,1392 -8,21000000,668,564,1322 -9,20500000,684,561,1308 -10,20000000,700,553,1312 -11,19500000,717,542,1258 -12,19000000,734,538,1256 -13,18500000,752,515,1179 -14,18000000,770,516,1161 -15,17500000,788,512,1186 -16,17000000,807,434,1284 -18,16000000,843,446,1245 -19,15500000,863,440,1235 -20,15000000,884,439,1228 -21,14500000,905,441,1245 -22,14000000,927,433,1239 -23,13500000,950,423,1181 -24,13000000,973,410,1171 -25,12500000,998,385,1299 -26,12000000,1023,372,1392 -27,11500000,1049,369,1329 -28,11000000,1077,356,1313 -29,10500000,1106,334,1280 -30,10000000,1136,343,1280 -31,9500000,1167,338,1287 -32,9000000,1199,327,1251 -33,8500000,1233,319,1218 -34,8000000,1268,312,1196 -35,7500000,1306,300,1156 -36,7000000,1346,294,1178 -37,6500000,1389,292,1154 -38,6000000,1435,284,1100 -39,5500000,1485,274,1079 -40,5000000,1539,249,1335 -41,4500000,1599,482,1228 -42,4000000,1663,246,1266 -43,3500000,1735,238,1207 -44,3000000,1817,236,1355 -45,2500000,1912,214,1148 -46,2000000,2026,213,1297 -47,1500000,2162,211,1138 -48,1000000,2344,198,1099 -49,1000000,2617,199,1347 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,59,1029 -1,1500000,774,61,1021 -2,2000000,969,60,1037 -3,2500000,1111,65,1040 -4,3000000,1227,75,1190 -5,3500000,1324,76,1164 -6,4000000,1409,83,1103 -7,4500000,1483,88,1255 -8,5000000,1548,100,1264 -9,5500000,1608,113,1235 -10,6000000,1662,104,1211 -11,6500000,1713,120,1257 -12,7000000,1760,124,1168 -13,7500000,1804,126,1088 -14,8000000,1845,129,1029 -15,8500000,1884,155,1027 -16,9000000,1920,160,1042 -17,9500000,1955,171,1090 -18,10000000,1987,180,1137 -19,10500000,2018,183,1137 -21,11500000,2072,198,1172 -22,12000000,2100,209,1202 -23,12500000,2127,224,1244 -24,13000000,2153,225,1236 -26,14000000,2198,244,1275 -27,14500000,2222,265,1141 -28,15000000,2244,269,1105 -29,15500000,2266,300,1131 -30,16000000,2287,301,1147 -31,16500000,2307,307,1166 -32,17000000,2327,318,1202 -33,17500000,2346,337,1272 -34,18000000,2365,371,1098 -35,18500000,2384,351,1317 -36,19000000,2402,351,1319 -37,19500000,2420,399,1392 -38,20000000,2437,377,1118 -39,20500000,2454,380,1073 -40,21000000,2471,419,1221 -41,21500000,2487,417,1239 -42,22000000,2503,434,1247 -43,22500000,2519,440,1274 -44,23000000,2534,453,1318 -45,23500000,2549,463,1342 -46,24000000,2564,472,1371 -47,24500000,2578,475,1384 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,58,1018 -1,1500000,775,62,1018 -2,2000000,969,65,1036 -3,2500000,1112,67,1173 -4,3000000,1227,83,1199 -5,3500000,1325,80,1217 -6,4000000,1410,84,1092 -7,4500000,1484,88,1239 -8,5000000,1549,97,1269 -9,5500000,1608,109,1252 -10,6000000,1663,109,1195 -11,6500000,1713,115,1260 -12,7000000,1761,128,1173 -13,7500000,1805,128,1070 -14,8000000,1846,134,1002 -15,8500000,1884,158,1031 -16,9000000,1921,163,1059 -17,9500000,1955,169,1110 -18,10000000,1988,179,1122 -19,10500000,2019,189,1161 -21,11500000,2073,199,1173 -22,12000000,2101,205,1189 -23,12500000,2128,218,1224 -24,13000000,2154,233,1270 -26,14000000,2199,240,1284 -27,14500000,2222,269,1200 -28,15000000,2245,279,1136 -29,15500000,2267,288,1125 -30,16000000,2288,304,1154 -31,16500000,2308,306,1165 -32,17000000,2328,314,1189 -33,17500000,2347,335,1266 -34,18000000,2366,374,1096 -35,18500000,2385,344,1295 -36,19000000,2403,354,1323 -37,19500000,2421,376,1253 -38,20000000,2438,371,1098 -39,20500000,2455,389,1110 -40,21000000,2472,415,1211 -41,21500000,2488,426,1250 -42,22000000,2504,425,1219 -43,22500000,2520,444,1293 -44,23000000,2535,454,1315 -45,23500000,2550,453,1315 -Number#,Frequency(Hz),Time(ms),I(12bit), V(12bit) -0,1000000,0,62,1010 -1,1500000,774,60,1020 -2,2000000,969,57,1013 -3,2500000,1111,70,1058 -4,3000000,1227,77,1196 -5,3500000,1324,78,1069 -6,4000000,1409,87,1101 -7,4500000,1483,89,1179 -8,5000000,1549,95,1265 -9,5500000,1608,107,1241 -10,6000000,1662,109,1174 -11,6500000,1713,119,1304 -12,7000000,1760,124,1188 -13,7500000,1804,129,1089 -14,8000000,1845,128,987 -15,8500000,1884,157,1031 -16,9000000,1920,164,1065 -17,9500000,1954,168,1083 -18,10000000,1987,176,1114 -19,10500000,2018,191,1152 -21,11500000,2072,203,1228 -22,12000000,2100,209,1196 - diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc deleted file mode 100644 index c7b5a3fc5..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioC.nc +++ /dev/null @@ -1,37 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - components new TimerMilliC() as Timer0; - components new TimerMilliC() as Timer1; - components new TimerMilliC() as Timer2; - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - //timers - App.Timer0 -> Timer0; - App.Timer1 -> Timer1; - App.Timer2 -> Timer2; - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc deleted file mode 100644 index ce54c33d1..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/DVSnoRadioP.nc +++ /dev/null @@ -1,257 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 5000 -#define DEADLINE 9000 -#define SAMPLES 15 -#define FREQ_25MHz 25000000 -#define FREQ_1MHz 1000000 -#define FREQ_STEP FREQ_1MHz -#define SWEEP_REPOST_DELAY 50 -#define UP - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; - uses interface Timer as Timer0; - uses interface Timer as Timer1; - uses interface Timer as Timer2; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - #ifdef UP - uint32_t Freq = FREQ_1MHz; - uint32_t EndFreq = FREQ_25MHz; - uint32_t ActFreq = FREQ_1MHz; - #else - uint32_t Freq = FREQ_25MHz; - uint32_t EndFreq = FREQ_1MHz; - uint32_t ActFreq = FREQ_25MHz; - #endif - uint32_t timeStart = 0; - uint32_t timeEnd = 0; - uint16_t Number = 0; - uint32_t adcStartTime, adcEndTime; - bool fibDone = FALSE; -//prototypes - //void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_1_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_64_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - /*adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - };*/ - - adc12memctl_t channelconfig [] = { - {INPUT_CHANNEL_A2, REFVOLT_LEVEL_1_5, 0}, - {INPUT_CHANNEL_A3, REFVOLT_LEVEL_1_5, 1} - }; - adc12memctl_t * adcchannelconfig = (adc12memctl_t *) channelconfig; - - task void delaySweep(){ - call Timer1.startOneShot(SWEEP_REPOST_DELAY); - } - - task void sweep(){ - uint32_t t0 = 0; - uint32_t now = 0; - - #ifdef UP - if(Freq<=EndFreq){ - #else - if(Freq>=EndFreq){ - #endif - atomic call Timer2.startOneShot(600); - atomic adcStartTime=call Timer2.gett0(); - //atomic adcStartTime=call Timer0.getdt(); - call adc.getData(); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else{ - ActFreq = Freq; - Number++; // increment the number of sequences calculated - } - //printf("adc.getdata; "); - //printf("tasks.getfib\n "); - atomic fibDone = FALSE; - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - else{ - call Leds.led2On(); - call Timer0.stop(); - t0=call Timer0.gett0(); - now=call Timer0.getNow(); - //printf("sweep: "); - printf("app end time: %lu\n", now-t0); - } - #ifdef UP - Freq+=FREQ_STEP; - #else - Freq-=FREQ_STEP; - #endif - } - - task void printadb(){ - uint8_t i; - uint32_t currentMean = 0; - uint32_t voltageMean = 0; - uint32_t vcoreMean = 0; - //float Gain = 37.5; //(Gm*Rout) - //float refVolt = 2.5; - //float Nmax = 4095; - //float Rsense = 1.01; - //printf("print adb: "); - for(i = 0; i < SAMPLES; i+=3){ - currentMean += adb[i]; - voltageMean += adb[i+1]; - vcoreMean += adb[i+2]; - } - currentMean /= SAMPLES/3; //bits - voltageMean /= SAMPLES/3; // bits - vcoreMean /= SAMPLES/3; // bits - //currentMean *= refVolt/Nmax; //value in Volts - //voltageMean *= refVolt/Nmax; //value in Volts - - //currentMean = (currentMean*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //voltageMean *= 2; // multiply by 2 to get total battery voltage - - atomic printf("%d,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu\n", Number, ActFreq, timeStart, timeEnd, currentMean, voltageMean, vcoreMean, adcStartTime, adcEndTime); - } - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - uint32_t maxTime = 9000; - while(e != SUCCESS){ - e = configureAdc(); - } - atomic TA1R = 0; //reset timer A - call Timer0.startOneShot(maxTime); - printf("Fib Iteration Num,ActualFrequency(Hz),Fib-startTime(ms),Fib-endTime(ms),currentMean(12bit),supplyMean(12bit),vcoreMean(12bit),adcStartTime(ms),adcEndTime(ms),app startTime(ms): %lu\n", call Timer0.gett0()); - post sweep(); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t startTime, uint32_t endTime, error_t status){ - timeStart = startTime; - timeEnd = endTime; - atomic fibDone = TRUE; - /*if(status ==SUCCESS) - printf("tasks.fibDone; %lu\n", endTime-startTime); - else - printf("fib fail..\n");*/ - } - - event void Tasks.FibonacciIterationDone(){ } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - //printf("data ready: post\n"); - adcEndTime=call Timer2.getNow(); - //adcEndTime=call Timer0.getdt(); - call Timer2.stop(); - - if(fibDone){ - post printadb(); - post sweep(); - } - else - post delaySweep(); - } - - event void Timer0.fired() { - //printf("Timer0 fired! end time of program not valid! \n"); - } - event void Timer1.fired() { - bool ready; - //printf("Timer1 Fired. Repost Sweep!\n"); - atomic ready = fibDone; - if(ready){ - post printadb(); - post sweep(); - } - else - call Timer1.startOneShot(SWEEP_REPOST_DELAY); - } - event void Timer2.fired() { - //printf("Timer2 fired! AdcConvertion endTime not valid!\n"); - } - //functions - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - float f = toBePrinted; - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%ld.%d%d%d", fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, adcchannelconfig, 2, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/3Channels/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc deleted file mode 100644 index c1a27ad20..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioC.nc +++ /dev/null @@ -1,32 +0,0 @@ - -#include - -configuration DVSnoRadioC { -} -implementation { - components MainC; - components LedsC; - components DVSnoRadioP as App; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - - //For tasks (fibonacci) - components TasksC; - App.Tasks -> TasksC; - - //For ADC - components new Msp430Adc12ClientAutoRVGC() as adc; - App.adc -> adc; - App.AdcResource -> adc; - adc.AdcConfigure -> App.AdcConfigure; - - //For frequency control - components Msp430FreqControlC; - App.FreqControl -> Msp430FreqControlC; - - //For UART - //components PlatformSerialC; - //App.UartStream -> PlatformSerialC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc deleted file mode 100644 index 13bea3ef2..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/DVSnoRadioP.nc +++ /dev/null @@ -1,237 +0,0 @@ -#include -#include "Msp430Adc12.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ADC_SAMPLE_TIME 10 //miliseconds -#define ITERATIONS 900 -#define DEADLINE 5000 -#define SAMPLES 16 - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12Overflow as overflow; - uses interface Msp430Adc12SingleChannel as adc; - uses interface Resource as AdcResource; -} -implementation { - - uint16_t adb[SAMPLES]; - //uint8_t count = 0; - uint32_t Freq = 1000000; - uint32_t ActFreq = 0; - uint32_t EndFreq = 25000000; - uint32_t Step = 500000; - uint32_t Time = 0; - uint16_t Number = 0; - bool AdcDone = FALSE; - bool flag = 1; - -//prototypes - void printadb(); - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - void frequency_sweep(); - - msp430adc12_channel_config_t adcconfig = { - - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_16_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_ACLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - event void Boot.booted() { - //printf("Booted\n"); - call Leds.led0Off(); - call Leds.led1Off(); - call Leds.led2Off(); - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - - } - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Adc is configured, now init the system - */ - printf("Number#,Frequency(Hz),Time(ms),Vin(V),I(mA)\n"); - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else - atomic ActFreq = Freq; - - call adc.getData(); - //printf("Conversion didn't start!\n"); - - uwait(1024*5); - atomic if(AdcDone){ - printadb(); - AdcDone=FALSE; - } - call Tasks.getFibonacci(ITERATIONS, DEADLINE); - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - printf("Task done in %lu ms\n",elapsedTime); - atomic Time = elapsedTime; - if(flag){ - flag=0; - Freq=EndFreq; - if(call FreqControl.setMCLKFreq(Freq) != SUCCESS) - printf("Could not change the frequency to: %lu Hz. \r\n", Freq); - else{ - //printf("MCLK frequency is now %lu Hz. \r\n\n", Freq); - atomic ActFreq = Freq; - atomic Number++; // increment the number of sequences calculated - } - call adc.getData(); - - call Tasks.getFibonacci(ITERATIONS+100, DEADLINE); - atomic if(AdcDone){ - printadb(); - AdcDone = FALSE; - } - } - - if(Freq==EndFreq){ - call Leds.led2On(); - return; - } - } - - event void Tasks.FibonacciIterationDone(){ - } - - async event void overflow.conversionTimeOverflow(){ } - - async event void overflow.memOverflow(){ } - - async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ - AdcDone = TRUE; - return buffer; - } - - async event error_t adc.singleDataReady(uint16_t data){ - return FAIL; - } - -//functions - void printadb(){ - uint8_t i; - float mean = 0; - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Current = 0; - //float Vsense = 0; - float Rsense = 1.01; - - for(i = 0; i < SAMPLES; i++){ - mean += (float) adb[i]; - //printf("Sample %d =", i); - //printfFloat((float) adb[i]); - //printf("\n"); - //printf("Vout ="); - //Vout = adb[i]*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf(" V\n"); - } - mean = mean/SAMPLES; - //printf("Sample mean ="); - //printfFloat(mean); - //printf("\n"); - - //printf("Vout mean (into ADC) ="); - Vout = mean*refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //printfFloat(Vout); - //printf(" V\n"); - - //Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - // printf("Vsense ="); - // printfFloat(Vsense); - // printf(" mV\n"); - - //Current = Vsense/Rsense; //current in mA, Rsense = 1.01 Ohm - //printf("Current ="); - //printfFloat(Current); - //printf(" mA\n"); - - Current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - printf("%d,%lu,%lu,", Number, ActFreq, Time); - printfFloat(Vout); - printf(","); - printfFloat(Current); - //printf(" mA\n"); - //printf("\n"); - printf("\n"); - } - - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - //e = call adc.configureMultipleRepeat(&adcconfig, adb, SAMPLES, 0); - e = call adc.configureMultiple(&adcconfig, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/Makefile b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/Makefile deleted file mode 100644 index 1e65e3cde..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT=DVSnoRadioC -include $(MAKERULES) diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h deleted file mode 100644 index 381b58fac..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/FibonacciTest/messagetypes.h +++ /dev/null @@ -1,11 +0,0 @@ - -typedef struct uartMessage{ - uint32_t freq; //actual frequency - uint32_t time; //time elapsed - uint16_t iter; //iteration number - uint16_t num; //number of the fib sequence - float current; //current being consumed - float voltage; //battery voltage - bool lock; -} uartMessage; - diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/ConfigureAdc.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/ConfigureAdc.nc deleted file mode 100644 index 28f536c25..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/ConfigureAdc.nc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011 João Gonçalves - * All rights reserved. - * - * This open source code was developed with funding from People Power Company - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * - Neither the name of the copyright holders nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include "Msp430Adc12.h" - -interface Msp430UsciConfigure { - /** - * Return a pointer to the configuration that should be used for the ADC - */ - async command const msp430adc12_channel_config_t* getConfiguration (); - - async command const adc12memctl_t* getAdditionalChannels (); -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc deleted file mode 100644 index f5eb9ae5a..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/DVSnoRadioP2.nc +++ /dev/null @@ -1,238 +0,0 @@ -#include -#include "Msp430Adc12.h" -#include "messagetypes.h" - -#ifdef ADC12_TIMERA_ENABLED -#undef ADC12_TIMERA_ENABLED -#endif - -#define ITERATIONS 900 -#define DEADLINE 5000 // 5sec -#define SAMPLES 16 -#define START_FREQUENCY 1000000 // 1MHz -#define STOP_FREQUENCY 25000000 // 25MHz -#define STEP_FREQUENCY 500000 // 500kHz - -module DVSnoRadioP { - provides interface AdcConfigure as AdcConfigure; - uses interface Boot; - uses interface Leds; - uses interface Tasks; - uses interface FreqControl; - uses interface Msp430Adc12MultiChannel as adc; - uses interface Resource as AdcResource; - uses interface UartStream; -} -implementation { - - uint16_t adb[SAMPLES]; - uint32_t actualFreq = START_FREQUENCY; - - uartMessage message = { - freq: START_FREQUENCY, - time: 0, - iter: 0, - num: 0, - current: 0, - voltage: 0, - lock: FALSE - }; - -//prototypes - void printfFloat(float toBePrinted); - void showerror(); - error_t configureAdc(); - error_t readAdc(); - void uwait(uint32_t u); - - msp430adc12_channel_config_t adcconfig = { - inch: INPUT_CHANNEL_A1, - sref: REFERENCE_VREFplus_AVss, - ref2_5v: REFVOLT_LEVEL_2_5, - adc12ssel: SHT_SOURCE_ACLK, - adc12div: SHT_CLOCK_DIV_1, - sht: SAMPLE_HOLD_4_CYCLES, - sampcon_ssel: SAMPCON_SOURCE_SMCLK, - sampcon_id: SAMPCON_CLOCK_DIV_1 - }; - - adc12memctl_t channelconfig = { - inch: INPUT_CHANNEL_A2, - sref: REFVOLT_LEVEL_2_5, - eos: 1 - }; - - async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration(){ - return &adcconfig; // must not be changed - } - - task void sendMessage(){ - float Gain = 37.5; //(Gm*Rout) - float refVolt = 2.5; - float Nmax = 4095; - float Vout = 0; - float Rsense = 1.01; - - atomic{ - Vout = message.current * refVolt/Nmax; - //Vout = ((float)((uint8_t)(Vout*100)))/100; - //Vsense = (Vout*1000)/Gain; //multiply by 1000 to get value in mV - - message.current = (Vout*1000)/(Gain*Rsense); //current in mA, Rsense = 1.01 Ohm - //printf("%d,%lu,%lu,", Number, ActFreq, Time); - message.voltage *= (refVolt*2)/Nmax; //multiply by 2 to get the real batery value - - printf("%lu,%lu,%d,%d,", message.freq, message.time, message.iter, message.num); - printfFloat(message.current); - printf(","); - printfFloat(message.voltage); - printf("\n"); - message.lock=FALSE; - } - } - - event void Boot.booted() { - printf("Booted\n"); - // P1DIR |= 0x40; // P1.6 to output direction - // P2DIR |= 0x01; // P2.0 to output direction - // P1SEL |= 0x40; // P1.6 Output SMCLK - // P2SEL |= 0x01; // 2.0 Output MCLK - //request the adc - call AdcResource.request(); - } - - event void AdcResource.granted(){ - error_t e = FAIL; - while(e != SUCCESS){ - e = configureAdc(); - } - /* - * Set start frequency - */ - if(call FreqControl.setMCLKFreq(START_FREQUENCY) != SUCCESS){ - printf("error: set start frequency\n"); - showerror(); - return; - } - /* - * Read first data - */ - readAdc(); - - //Start the First Fibonacci running at START_FREQUENCY - if(call Tasks.getFibonacci(ITERATIONS,DEADLINE) != SUCCESS){ - printf("error: first fib\n"); - showerror(); - return; - } - } - - event void Tasks.FibonacciDone(uint16_t iterations, uint32_t elapsedTime, error_t status){ - bool lock; - printf("fib done: elapsed %lu\n", elapsedTime); - if(status!=SUCCESS){ - printf("error: did not finish fib\nelapsed %lu\n", elapsedTime); - showerror(); - return; - } - printf("wait adc 1\n"); - while(lock){ atomic lock = message.lock; } //wait for any adc convertion to finish - - atomic message.time = elapsedTime; - readAdc(); - - if(actualFreq==STOP_FREQUENCY){ - /* - * Finished, light green led - */ - call Leds.led2On(); - return; - } - if(START_FREQUENCY < STOP_FREQUENCY) - actualFreq += STEP_FREQUENCY; - else - actualFreq -= STEP_FREQUENCY; - - printf("wait adc 2\n"); - while(lock){ atomic lock = message.lock; } //wait for any adc convertion to finish - atomic message.num++; - atomic message.freq = actualFreq; - - if(call FreqControl.setMCLKFreq(actualFreq) != SUCCESS){ - showerror(); - atomic printf("error: in fibDone %d\n", message.num); - return; - } - - if(call Tasks.getFibonacci(ITERATIONS,DEADLINE) != SUCCESS){ - showerror(); - return; - } - - } - - event void Tasks.FibonacciIterationDone(uint16_t iter){ } - - async event void adc.dataReady(uint16_t *buffer, uint16_t numSamples){ - uint8_t i; - uint32_t current, voltage; - for(i = 0; i<(numSamples/2); i++){ - current += buffer[i]; - voltage += buffer[i+1]; - } - message.current = (float) current/(numSamples/2); - message.voltage = (float) voltage/(numSamples/2); - post sendMessage(); - } - - async event void UartStream.sendDone(uint8_t* buf, uint16_t len, error_t err){ } - async event void UartStream.receivedByte (uint8_t byte) { } - async event void UartStream.receiveDone (uint8_t* buf, uint16_t len, error_t err) { } - -//functions - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - void showerror(){ - call Leds.led0On(); - } - - error_t configureAdc(){ - error_t e; - e = call adc.configure(&adcconfig, &channelconfig, 1, adb, SAMPLES, 0); - if(e != SUCCESS){ - showerror(); - printf("error %d\n", e); - } - return e; - } - - error_t readAdc(){ - atomic message.lock=TRUE; - return call adc.getData(); - } - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/messagetypes.h b/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/messagetypes.h deleted file mode 100644 index 381b58fac..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/DVSTest/noRadio/old/messagetypes.h +++ /dev/null @@ -1,11 +0,0 @@ - -typedef struct uartMessage{ - uint32_t freq; //actual frequency - uint32_t time; //time elapsed - uint16_t iter; //iteration number - uint16_t num; //number of the fib sequence - float current; //current being consumed - float voltage; //battery voltage - bool lock; -} uartMessage; - diff --git a/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientC.nc b/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientC.nc deleted file mode 100644 index 3302da149..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientC.nc +++ /dev/null @@ -1,12 +0,0 @@ - -configuration ClientC{ - -} - -implementation -{ - components new SettingsC(); - components ClientP; - - ClientP.FlashSettings -> SettingsC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientP.nc b/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientP.nc deleted file mode 100644 index 839aa9379..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/FlashTest/ClientP.nc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -module ClientP @safe(){ - uses interface Settings as FlashSettings; -} - -implementation -{ - uint8_t data[] = {9,33,3,2,5,6,9,25}; - - event void FlashSettings.requestLogin(){ - error_t status; - uint8_t i; - - printf("Second Client: "); - printf("Request login.\n"); - - status = call FlashSettings.login((void*) data, sizeof(data)*sizeof(uint8_t)); - switch (status){ - case EINVAL:{ - printf("Second Client Request Login -> EINVAL.\n"); - break; - } - case SUCCESS:{ - /*printf("Second Client storing to flash: "); - for(i=0; i MainC.Boot; - FlashTestP.Leds -> LedsC; - - components new SettingsC(); - FlashTestP.Settings -> SettingsC; - - components SettingsP; - FlashTestP.Init -> SettingsP; - - components Msp430FlashC; - FlashTestP.Msp430Flash -> Msp430FlashC.Msp430Flash; - - components ClientC; - } diff --git a/tos/platforms/MoteISTx5/tests/tests/FlashTest/FlashTestP.nc b/tos/platforms/MoteISTx5/tests/tests/FlashTest/FlashTestP.nc deleted file mode 100644 index 75fe3e61e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/FlashTest/FlashTestP.nc +++ /dev/null @@ -1,86 +0,0 @@ - -/** - * - **/ - -#include "Timer.h" -#include - -module FlashTestP @safe() -{ - //uses interface Timer as Timer0; - uses interface Leds; - uses interface Boot; - uses interface Settings; - uses interface Init; - uses interface Msp430Flash; - } -implementation -{ - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - //prototypes - void test(void); - - uint8_t data[] = {9,33,3,2,5,6,9,25}; - event void Boot.booted(){ - printf("Booted.\n"); - - if(call Msp430Flash.isFirstBoot() == TRUE); - printf("It's First boot\n"); - - call Init.init(); // this is the first client - //if(call Client.FlashTestClient() == SUCCESS) // this is the second client - // printf("First Client: Second Client as called init"); - - } - - event void Settings.requestLogin(){ - error_t status; - uint8_t i; - - printf("First Client: "); - printf("Request login.\n"); - - status = call Settings.login((void*) data, sizeof(data)*sizeof(uint8_t)); - switch (status){ - case EINVAL:{ - printf("This is the first boot, nothing in flash memory.\n"); - - printf("Storing "); - for(i=0; i - **/ - -configuration ClockTestAppC{ -} -implementation -{ - - components MainC, ClockTestP, LedsC; - //components new TimerMilliC() as Timer0; - components SerialPrintfC; - //components PlatformSerialC; - //ClockTestP.UartByte -> PlatformSerialC; - - components Msp430FreqControlC; - ClockTestP.FreqControl -> Msp430FreqControlC; - - ClockTestP -> MainC.Boot; - //ClockTestP.Timer0 -> Timer0; - ClockTestP.Leds -> LedsC; -} - diff --git a/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/ClockTestP.nc b/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/ClockTestP.nc deleted file mode 100644 index 51630f88e..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/ClockTestP.nc +++ /dev/null @@ -1,69 +0,0 @@ - -/** - * Output MCLK and SMCLK on Boot. - * Toggle One Led to know the OS is alive - **/ - -#include "Timer.h" -#include -#include "../../../../chips/msp430/x5xxx/usci/msp430usci.h" - - -module ClockTestP @safe() -{ - //uses interface Timer as Timer0; - uses interface Leds; - uses interface Boot; - uses interface FreqControl; - - //uses interface UartByte; - } -implementation -{ - uint32_t wait = 7536640; - - void uwait(uint32_t u) { - uint32_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void frequency_swype(uint32_t start_freq, uint32_t end_freq, uint32_t step){ - while(start_freq <= end_freq){ - printf("Setting MCLK frequency to %lu Hz.\n", start_freq); - if(call FreqControl.setMCLKFreq(start_freq) == FAIL ) - printf("Could not change the frequency to: %lu Hz. \r\n", start_freq); - else - printf("MCLK frequency is now %lu Hz. \r\n\n", start_freq); - start_freq = start_freq + step; - uwait(wait*5); - } - } - - event void Boot.booted(){ - uint32_t start_freq = 500000; - uint32_t end_freq = 25000000; - uint32_t step = 500000; - uint8_t source; - uint32_t freq; - - P1DIR |= 0x40; // P1.6 to output direction - P2DIR |= 0x01; // P2.0 to output direction - P1SEL |= 0x40; // P1.6 Output SMCLK - P2SEL |= 0x01; // 2.0 Output MCLK - - printf("#\n\n|************* Starting frequency swype *************|\n\n"); - - if(call FreqControl.getMCLKSource() != SELM__DCOCLKDIV){ - printf("#MCLK is not sourced by DCOCLKDIV.\n\n"); - return; - } - printf("#MCLK is sourced by DCOCLKDIV.\n\n"); - //printf("#VCore will be ajusted to the frequency of MCLK.\n"); - printf("#Start swype at %lu Hz and end at %lu Hz. Use %lu Hz of step.\n", start_freq, end_freq, step); - - frequency_swype(start_freq, end_freq, step); - printf("#\n\n|************* Frequency swype finished *************|\n\n"); - - } -} - diff --git a/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/Makefile b/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/Makefile deleted file mode 100644 index 5c7e922b2..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/FrequencyTest/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=ClockTestAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadio.h b/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadio.h deleted file mode 100644 index e0cdf181a..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadio.h +++ /dev/null @@ -1,22 +0,0 @@ -// $Id: BlinkToRadio.h,v 1.4 2006-12-12 18:22:52 vlahan Exp $ - -#ifndef BLINKTORADIO_H -#define BLINKTORADIO_H - -#ifdef TOS_NODE_ID -#undef TOS_NODE_ID -#define TOS_NODE_ID 1 -#endif - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 1500 -}; - -typedef nx_struct BlinkToRadioMsg { - nx_uint16_t nodeid; - nx_uint16_t counter; - nx_uint16_t teste; -} BlinkToRadioMsg; - -#endif diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc b/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc deleted file mode 100644 index fc7ea5dd8..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioAppC.nc +++ /dev/null @@ -1,72 +0,0 @@ -// $Id: BlinkToRadioAppC.nc,v 1.5 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Application file for the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -configuration BlinkToRadioAppC { -} -implementation { - components MainC; - components LedsC; - components BlinkToRadioC as App; - components new TimerMilliC() as Timer0; - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - components SerialPrinfC; - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc b/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc deleted file mode 100644 index c57a7d914..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/BlinkToRadioC.nc +++ /dev/null @@ -1,134 +0,0 @@ -// $Id: BlinkToRadioC.nc,v 1.6 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Implementation of the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -module BlinkToRadioC { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - uint16_t counter; - message_t pkt; - bool busy = FALSE; - - void setLeds(uint16_t val) { - if (val & 0x01) - call Leds.led0On(); - else - call Leds.led0Off(); - if (val & 0x02) - call Leds.led1On(); - else - call Leds.led1Off(); - if (val & 0x04) - call Leds.led2On(); - else - call Leds.led2Off(); - } - - event void Boot.booted() { - call AMControl.start(); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer0.startPeriodic(TIMER_PERIOD_MILLI); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void Timer0.fired() { - counter++; - if (!busy) { - BlinkToRadioMsg* btrpkt = - (BlinkToRadioMsg*)(call Packet.getPayload(&pkt, sizeof(BlinkToRadioMsg))); - if (btrpkt == NULL) { - return; - } - btrpkt->nodeid = TOS_NODE_ID; - btrpkt->counter = counter; - btrpkt->teste = 23; - if (call AMSend.send(AM_BROADCAST_ADDR, - &pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) { - busy = TRUE; - printf("Sent a packt\n"); - } - } - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - - if (len == sizeof(BlinkToRadioMsg)) { - BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload; - setLeds(btrpkt->counter); - printf("Received \nnodeid: %d\ncounter:%d\ntest:%d\n", btrpkt->nodeid, btrpkt->counter, btrpkt->test); - } - return msg; - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/Makefile b/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/Makefile deleted file mode 100644 index b71352121..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/MoteISTx5/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=BlinkToRadioAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadio.h b/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadio.h deleted file mode 100644 index a81d7be69..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadio.h +++ /dev/null @@ -1,22 +0,0 @@ -// $Id: BlinkToRadio.h,v 1.4 2006-12-12 18:22:52 vlahan Exp $ - -#ifndef BLINKTORADIO_H -#define BLINKTORADIO_H - -#ifdef TOS_NODE_ID -#undef TOS_NODE_ID -#define TOS_NODE_ID 1 -#endif - -enum { - AM_BLINKTORADIO = 6, - TIMER_PERIOD_MILLI = 2000 -}; - -typedef nx_struct BlinkToRadioMsg { - nx_uint16_t nodeid; - nx_uint16_t counter; - nx_uint16_t teste; -} BlinkToRadioMsg; - -#endif diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioAppC.nc b/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioAppC.nc deleted file mode 100644 index cfc8a8744..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioAppC.nc +++ /dev/null @@ -1,72 +0,0 @@ -// $Id: BlinkToRadioAppC.nc,v 1.5 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Application file for the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -configuration BlinkToRadioAppC { -} -implementation { - components MainC; - components LedsC; - components BlinkToRadioC as App; - components new TimerMilliC() as Timer0; - components ActiveMessageC; - components new AMSenderC(AM_BLINKTORADIO); - components new AMReceiverC(AM_BLINKTORADIO); - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - App.Packet -> AMSenderC; - App.AMPacket -> AMSenderC; - App.AMControl -> ActiveMessageC; - App.AMSend -> AMSenderC; - App.Receive -> AMReceiverC; -} diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioC.nc b/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioC.nc deleted file mode 100644 index 65d7d40e4..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/BlinkToRadioC.nc +++ /dev/null @@ -1,131 +0,0 @@ -// $Id: BlinkToRadioC.nc,v 1.6 2010-06-29 22:07:40 scipio Exp $ - -/* - * Copyright (c) 2000-2006 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of the University of California nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * Implementation of the BlinkToRadio application. A counter is - * incremented and a radio message is sent whenever a timer fires. - * Whenever a radio message is received, the three least significant - * bits of the counter in the message payload are displayed on the - * LEDs. Program two motes with this application. As long as they - * are both within range of each other, the LEDs on both will keep - * changing. If the LEDs on one (or both) of the nodes stops changing - * and hold steady, then that node is no longer receiving any messages - * from the other node. - * - * @author Prabal Dutta - * @date Feb 1, 2006 - */ -#include -#include "BlinkToRadio.h" - -module BlinkToRadioC { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; - uses interface Packet; - uses interface AMPacket; - uses interface AMSend; - uses interface Receive; - uses interface SplitControl as AMControl; -} -implementation { - - uint16_t counter; - message_t pkt; - bool busy = FALSE; - - void setLeds(uint16_t val) { - if (val & 0x01) - call Leds.led0On(); - else - call Leds.led0Off(); - if (val & 0x02) - call Leds.led1On(); - else - call Leds.led1Off(); - if (val & 0x04) - call Leds.led2On(); - else - call Leds.led2Off(); - } - - event void Boot.booted() { - call AMControl.start(); - } - - event void AMControl.startDone(error_t err) { - if (err == SUCCESS) { - call Timer0.startPeriodic(TIMER_PERIOD_MILLI); - } - else { - call AMControl.start(); - } - } - - event void AMControl.stopDone(error_t err) { - } - - event void Timer0.fired() { - counter++; - if (!busy) { - BlinkToRadioMsg* btrpkt = - (BlinkToRadioMsg*)(call Packet.getPayload(&pkt, sizeof(BlinkToRadioMsg))); - if (btrpkt == NULL) { - return; - } - btrpkt->nodeid = TOS_NODE_ID; - btrpkt->counter = counter; - btrpkt->teste = 23; - if (call AMSend.send(AM_BROADCAST_ADDR, - &pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) { - busy = TRUE; - } - } - } - - event void AMSend.sendDone(message_t* msg, error_t err) { - if (&pkt == msg) { - busy = FALSE; - } - } - - event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ - if (len == sizeof(BlinkToRadioMsg)) { - BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload; - setLeds(btrpkt->counter); - } - return msg; - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/Makefile b/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/Makefile deleted file mode 100644 index b71352121..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/RadioTest/micaz/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=BlinkToRadioAppC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/tests/TimerTest/Makefile b/tos/platforms/MoteISTx5/tests/tests/TimerTest/Makefile deleted file mode 100644 index d6c413dae..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/TimerTest/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=TimerTestC -include $(MAKERULES) - diff --git a/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestC.nc b/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestC.nc deleted file mode 100644 index b7b5f2c29..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestC.nc +++ /dev/null @@ -1,17 +0,0 @@ - -#include - -configuration TimerTestC { -} -implementation { - components MainC; - components LedsC; - components TimerTestP as App; - components new TimerMilliC() as Timer0; - components SerialPrintfC; - - App.Boot -> MainC; - App.Leds -> LedsC; - App.Timer0 -> Timer0; - -} diff --git a/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestP.nc b/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestP.nc deleted file mode 100644 index f62bcab26..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/TimerTest/TimerTestP.nc +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#include -#define DEADLINE 100 - -module TimerTestP { - uses interface Boot; - uses interface Leds; - uses interface Timer as Timer0; -} -implementation { - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - - event void Boot.booted() { - P6SEL &= 0xFB; //ADC2 sel GIO func - P6DIR |= 0x04; //ADC2 sel output func - P6OUT &= 0xFB; //ADC output 0 - uwait(1000); - P6OUT |= 0x04; //ADC output 1 //start pulse - uwait(1000); - P6OUT &= 0xFB; //ADC output 0 - uwait(1000); - P6OUT |= 0x04; //ADC output 1 //start pulse - call Timer0.startPeriodic(DEADLINE); - } - - event void Timer0.fired() { - uint32_t time; - P6OUT &= 0xFB; //ADC output 0 -// P6OUT |= 0x04; //ADC output 1 //end pulse - //time = call Timer0.getNow(); - //printf("Timer fired at %lu \n", time); - } -} diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/1.188V-error.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/1.188V-error.csv deleted file mode 100644 index 816dd18c15fa1a58221c7a50df2966d3981d3547..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6091 zcmZvgS(5BF3uyxeE!zOQ3* z6Ve0kFLruv@zUd*Tjp>hvW*95Cm z&mi8%Ls)NtBWMnjq>i%Q$mCTauF3`E6gmG^1fGYFIxZ5D=SWVD@3BC`mUw zs0{0A?&K$X>UWdIreOWjGq%J?la|Rw#*-wHm~X0*Q>B|+l1M0H>-HPo|@2%aUK&jX3Um-QkRYZTeZ z2rCJv2fU*MfdN_^*s3GQm!jBX>+DQM$Bkt*H$|SvplJg|?^tOpp~9($Qiz~j;v8)WrqvT*%?Yg*Q}B@E*1df zyE*ck0--WEJG@VrUtMfSKcQRQRkv7o+qR3`pN-;RI>(OzQm*|QNyU^wdB(uJH4si z`0YgyDW*{iv5~Q;1BNutbMA$bxJZ6B$(Y_Hxm+rHrw(#Y=vv>30 z+*1hfFcqbHods}%f#|b61|8q{&EbR(Y>W&jvh}sw7<*^DeBLHLcJIMyW)KP7rKdf-C`&yx>#mN?xJ)#^EeJ?zMMVd*1v52lHk>9Ti2)}hbcc(UI8GT8B z$V@>r`>o&b{;=TI;r~=B4Y2?m=rdQyHEj^Q4Bb%`d$VsY&*9cb+4uidtyLt;L2SQFr%s4qm;6yNMW8E{ah|A?ZM0xtBEgnC02WXCMz($m`N`IIF~5nD_p|1$ zC`lV2sGa1eQw<1GH+J^_3sKM3Hfi0OrsRumr&K|g63Geu86f_gRR*X8DTmUgVKXvP z@&W{g_=l+lPtwV@CgI5(v{GWiD&6qc?VfN8kc_-;=sO(;90&ZY$|rDNwesvc_e8~({MRw(gi4j?CcB0q*)q@ P>`dKkN_PU?e<=M6??E=e diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.137V-error.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.137V-error.csv deleted file mode 100644 index d28c2ddd78d4ab09cbb7310396a585129ee19eeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7365 zcmZ9RUDAU%3(27mcW!=I_n9d@`#%4kt((u@%p7BDvHZi$?~K-cX097< zKi(7>Gv8zL_yDOX*u3jcxOn&i_lA{^aJAydX9SIhbrY^LwPFfDcGD4Xzq8;3Ptb4U zbGh+(!8BPq$^;9Zt}{$$YLg^Cyou?%p_5Cm?-?y)|5#${FsRoJV>~-(yt6GdCW$DV zGv6S~(O5YvZ3+z9lr#DmgS9mjp1sM$a`}}EnXVDE=|zBg*z)o+TCrf-OsFXDEzGx& z@UC=yW_el{KV|tWuf!BC>5@bwx#dcwC4LIm?2g;BVn)PGJC$x+hxG#|s&Up&n+9g= zc(7topBRF41#xVZPJUk)Yk}OwpKXB$W9XvJe}NlqW?j*?X$V)-Ug$B3Qv+$NHUzvP z@YInJ$q*7k?A1u&6cR$VZsrAEvm+e&v)_k&%0*$?=r8=4toX78mZ)-5G9ap__*+{; z0Smj@y88?)={#cXLv}g)O0cZ;e zR{7IUaT+b%C|h5SZ2N0^;-_h~iyhfxwY_yOV{*GxfLc zK;;uhl^+moSt=$MAz52dTMlTGjAGhQ&Li;@=WI%OZO~LR8D->wPLbopa!B?FChLen z?z+J9nVAPZzmTkDHD9(p-0cnQ8uT&-Rmvob8eLkRBY%{^^jwV{63oV{a0B<0Ckjye zS`IEsY%OCxCucv)eevtOga?KE>zPV`$>;h zER}U1e}%GmW;-PpmI`DYjaa^ST%@(DbmTf0nB5trD4h~qz{OVUAh;DZM$XOnQr|MO z4aIc>DOr=I^3!)U17oDk)y_Pq+hu$odm85E&-05stHYV1GPtf1Yueb&HKRy7qri87 zr0&s;5iux$rw)?&Ej_&)^xk2XER}sksS-d1VxE<9GtoI@ri9bN!HH9Tw>lJ`rUij_ zyI%@J#j4`RfX;lgE=g~fF=$dp8AEOPWvksN=aW&(AtWm8%yQ;Uz&|aV-Dv$xq(Sqn zEz9NhgN_&_5LmGQ?XU(0Z9Fw6T^47DD>5#eLpsPyQ{}>qJ>9hqK(bdXhfHoA@!dfd z^%-IFJe$tVj`cZ$b$zCg49xUH*3TXwGG}tZZ6$7JCaoN>b`Xa#B&r+rMb>FeM;L2M zws2mAM3OxcC-6M$)oVue!_wwfekp9{>_-kE+4gRqz|E#LO8oT)&elyt34}IFvP7AL zWV2_4;)gT0@|Kf9x1|FP7RtnzGH5KRl%KW?Ryr3jYWI~=(i<$%O%EheZA~CV&2mZW zfgCMZaTgGz?)-#7`Fp1%FMSIVi!8u*_H_IEoB% zo&rey_9NhS3c^ukG%!FEJ67c9{?E-&EL`0&kb04Br}U=ACf8?&&&}mOBIK~cPzOOG s>Xa}sG$s86wbi5p`kdKE60Gzof(4<5wC=a&Eb#h+A$s_s+eys-0ZGsXq5uE@ diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.435V-error.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/2.435V-error.csv deleted file mode 100644 index f12a221e98db8693fba0f49a1ac25d618b99d294..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7183 zcmZA5TaF_+3`EiSp2ZBxcKT8K-`D`YCxBLe3C^U*U@%B2{m=cs>+yR2`(5teBBS2|A?rF= zdZPUB3H%#9cws5c9=?R_7j{4RJo78fPaB@${N#*69(nm7BugX@XFjP%pcgNd<0<#H zFJABB^ZLnz7X^5s4m}bJi|7w5g%gof_lC@dOx}>?dL{l^UO$YV?BTdRz)w9DTn=i>HA1FAoaJQ?<8z}VNLp0m`9){SxS^BJQ4oU* zizSIkr3i4!@1v*+*FM8obAgKqf=0oHW7}cTjSHkn0$~o~?12L8=0zRGyrx7CXNc?_ zUCW5BH~dl1_HljCvuf(Ne9jq?V^>BS>55u}6{kR=f0z&o3M8E{S<>K39b_xNqHnTi za_^zyEL*%_sX(`*12#X8G}nf3VuGX&2Fd%KrCvFY30RcT0Y(~=_mSTN-0yPTdN)4d zGz-dorzj$OIPpQp z99%hcIGkqIN=%W(W9c%4@*QWp*9lD0YbUOw)w?aIvmAXp zoUmxh0CIh)SV_ChJeUM&=UCClE@vqVgPSP5Thdhw*XKE=;Ac68j3Qf<_#BlEsVPJ% z3J~}QUh*=5;rgW9C~1RPFuha&GX&h-a8V$-Y@=L>S9e$}nQWFzGw{Oh`qRUSkENoP z!#xmCZ{%eHwKHc}WP3Ewwi8jV>2tSxL?XGxP~9c*Q0oeJu(b0pOK{It+bvzTN|l#s z(C7jeA%qEpYU-R!h-fDQlU!@&Utu}R#1P2j&ScWhHMxx}a1VgeTvwIYMi7>ceJsu7 zD`&eyAH!+`H!SzwJ#0{_64UnQc-kQ)=`0rryR=J@XpQRu^vk%&%Q_s_nE<%1iiuPD zyC9$SQ$`sDchlz3H9?c`4jYsQ;*o2U!AB?}otyV^FrlZ`wl6V-D?k0P;{{xSvUD+% z9}0Gol$fJVRfI*4!)=X@YXujtU;7?Alx5EEs{m(tF=k*HPLQ}hGb(94Z4&L)oTYc0 z*9D?Mma<(VAWPd8?NJ&81tv3dbc?rP6waM0wP8DtB)!poGU*?=6VgA zr5Um@qhc&!DTlR15BJ%r?y)5I4x79GiOycx$9a%+_!OM-Hb6 z*N3y!ws#JVb&hzscFaq~tr-&=qiwji>}qR!`R%_Fg~L+35W_j{DS5~$D$(yEm znJ{f&N&0PA#~ov4%m;UUR3m6~Wi*1O@;2;dd{lFn{7lx&A{>eB5{x=ri*D)R?a1As zsMX+9chTL_-H9Av+aM5Hqg?L3Wwf>vZ;A|(2HKo}?5HMvuE%<31nt}`I+G1tszX+b gE(U3;tBj5iXCp5+%opKSw!3P|Hb~B+-{-&o14jJqFaQ7m diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/297.7mV-error.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/297.7mV-error.csv deleted file mode 100644 index da42f68a14137c6c0da26c8823d4e67dae11f8e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9969 zcmZwMQF0?Y4n)!Uev6r~B}=mQzp;^ZPx>`G=8K^!f=DEiAXxg($A2%+=jT5^!|nDS zzWQ~)ynj8P@8NE^{yFpR*Z2G3BZGUZ-0ts(U%k6E^WMXUDGf6?KwN>y?vWix_eUUt zw8db7lfl<}CWG1a@WG(P?mfKqYZO=o&O!nA5kTJeurIy9-)61Sb86){V51a`s zA_w<;*RMqsGN|n_AjJN8c=zxwu!6oF`6G5By5;ZL6z^0i;`{oE_WHrmB?FMY`gJX^ zE0PJbhs5{AgF*f*)27-i7)tjqArpcIv!5 zoTrRm8|;7|yI*rl?+g%1ODoOOu2hk?G&YmUr}-W_t0;0zNC1*i-eTJbO_})tNfF=a z#5)6ILB>N;#Qa~;HpRZBRtMNn3q|Y_K;D@vfFPZDxCVZqFfR|%PfH4t4Rk5t_U5Bs zE7Y(6(K~y3>VXUs82rCPdKh(1$_=uTzo|9wtET;ejEKJTt{|->w93>fRTL>A(&!yY zEgfO8E!HLArNO&v=I;V{dD89{16R;7xC)lt1(t&>N1gaqY0adN3}E9z_@{!Y}8WhZf~rli;u^cdcH`E4X@ zbkVLm%#j=!^B@7m=Q=K{bkZo_an6mBR`xtz6PjW;r0z)0QO>kc2-$B zvUcIXZstzkee6#m_R0=+>d6BlKa=VDvldhGsAsi~_spjWft{JAB{DUo7`6?2xBGMn zSQ@FoDijh_$`!(>0P+Oqs?mt`AyQ4kh)V71z4a zDLH?3zjrzol<(TYADQ;+(qPBgD-$N1WD}O12uRL+Uyb^;1B{@_G=rIYchEy_7L$NM zDopR_Y$f)HXvG6+k_x=jf+qA!+)nJ$Q7D*Tu&RLD}|l%vC7{?OAvFK6kp9~4I?m*JC=BXV_6m5K@XDmCPiBN6Q` z6E9ALb!5Ta*VlfnjOJk%F*&jWgvsFN;j5p3rNr%=ZpyAuh_rMDC|@3UIMNT&Ut9~b zHP)MrWbyfyfna5Z_V!;-8ZIe!lJ zonuizk(QqL4xyasUw4mkDnR)kEdBDbEn}v1n@Jnv62A1Fpm_^E?VuCeXIh4TFcQVLK+6QDgJ4qf)z3>1%hn$ z#hP0lnmK7?0Me)n(r)Dx(kc@}VXinH`4jE_(*VgTsLOoqNK4ysYeS(17p)EFxuRk& zV^q#9e^zO5C4H~*k|IGDw1^y-`j8d>)^tAjPPAUiDxuybCSE2?1rV~{$-`0{c)M!X zB+O^90|g;1w*09f1x*?|Wl)En7TZzBEy@eU&2$&{=vnn{vF$N-7!1M E0D6w&od5s; diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/gnd-error.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/adc-error/gnd-error.csv deleted file mode 100644 index 0aadc8bba5e262017843e015158201c5edff9fa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7001 zcmZwMNwV885ChPxbC{GSJIVbomH`h7xc-Voss{kwBqjUX@#8qoU*G=?$N7Ia-~Wf} z$l}iouRQymS%&i&6SKG<@v8}U&tiGriJ7#Am@YDcI^FO7fj%EY0Xi0>NY;L5N)jCUHN(9fxBx3?w2Sakyldv}9GPR)vC4 z^8>=O(7cI-5tD$>QhKS)KzXRa9Y_~`v)C@+7kO@iXg6?S(IN6>xH!O>#T(o>w6n$p z6+-S_X#uDtihMwzqNO6;r7nj}EyUBNhH2gl& z0!Sq@iTI6lJ$DHrLs0jS13tk{GnyqPWG;s84&?xXF0vampV>&>3q{%_I!PBxX?vYP zMtRkYWt-izX;Uv5ZDBQs63TFbZ3LbH8lrbAdJW-nSMf>CL)ghP*@SgLKWT`|E;ar#2e zJwta#u=G+~DucS0FdNXUNWlS6bzW?rk?{0);TYngNwe7nb4jd3O&=dHzT$=kVvtDkpPp~!$@T8-Q z0b72WVKtK$z*Q+xdfcZDy;H@MJ({)oa90jx9Ebi|Av^a7;ya-A1L-TV`kFS4^5LhN zNz@V#O?$KZeH1KCwZ#GIl@17`msn!<42k7_TNL$*MM%LsBRLKV$3%8|&a4^uWpILh z6gAKK>krEmpv@qP3$r$v+5alA4UdB z^w%HxQht7S;J)=lqCBDb&cK}mDkMO&eXWT`mn~eCpJwl`sQiMn2mBPyn@;~S2;9Hz F_6NDWm!<#! diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2.csv deleted file mode 100644 index 267823af81b58b6ff4355ff12d3e274bc39535a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1326 zcmY+E!HyF_3`9BiSLC=zjnr=2-ED3hKyZKy{6Gjfti*;Tn;^m0^Li$OmPi>Tp6YVB z$}=zC-GAMExE#;>%l(hj?$h-lzd2m4`|t10$Dh~Z>G1pR{hyZ^)T^h<{(Sjz|8Tr} zcv>sR)3<;B57+bgc)EN%?oW48zusS7=BMl9kV41Nv@-}yc}6LrE|!X%V^2qUc1+jmbKQ%G1(W^+H#FTlTb~b{RY+QK)oQhLT?Ri zbmX+5w+>B>8CF_#x2&C!gdgzI9R$bCxeQ4?_YK==t$|vZvW+gwWZFY;r}i}R*su{b zo7fzA4&)AR&^|_Erdkt&+^{CIhB_eA+DYE1_xEXtEYPiDuc-vq8od z1-B@#N`hdhqhuILhI2x1Z;{+ zMfZ$hL$iw66`K^x*2IGVo!q%J9Ap``9DQ2t1W6i;CyW{_33YlBdXgF2#%-K+8yJIC zOv(BM4!SY4n?;hyvSsOW?cDp4$5gWHH|?A~#qN@3#49z@oQ?9v_8H-=>4YM}1My8I z%>~}F^fqYQ*(vOrXg0L4($pJuc8aW7q2)uNgC5GQxmgQZ0?EB|WQe9p%PmVE9XT}-M=W3& Tp60uUH{9;REARErN0Iaw<7XVl diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-1MHz_25MHz-5000it-2_7V-ref1_5V.csv deleted file mode 100644 index 45ef1bd1ac4da465cbd954bbf451027e79a486cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1329 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 diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/AutoPMM/autopmm-25MHz_1MHz-5000it.csv deleted file mode 100644 index e5195371434e4b36d5f1e20180d32264b1a7bc1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1304 zcmY+E&5jd641_uNQ{=cvMrzyb{^7=f6&&CKFAzcwEA56Qn;AxA(Wl{m=9MuzSAw@cXrZdh>MJ9#3EI9`-j6 zPnVPZ;rrkF-T8RjA5Ne4+ry38x4YA8c{)En-ao%Q`L+9T+`l~7e&2ohFD(b}Uu4}r zK5qW2`*!2rlZr)NmK4iUS{831R-%h*a92Z0iDaBzfss`rOrnhmEC5TDGKPdlaxq_l zL#38jzyKX!BeV~x7O9BY6W=K_i;ANr@$86B{;U6n;HY7wuQ1<^q%@1*%pm{p4JT z_Q9n^Vrwf{-9-&@B`-Y%V56?WUbWVw>~%#ORC%J}gRzt#WK;lV$|YK&DrzhXAl<7E z6lzlzq_WY;?FvCJBh7tPi$63`Mimd#zM#>9bF!48Nx4}i(?D~r=;@RO&4{T=@j`*< zo)o65ZdwPijogO%pqWcls8%%AhRBoYDxP-a)ls0^a7jTTi_TGZLVCrG++3QZ;+Xbg zxFDy7jKk^#jOkC*Oo+CsXlmeij`^06z^EdZsS-<5iG3B)uptTIpbP7n*^Q*mBy5=< z#=8#NVjk83A-s1P-x42aYf(z#wOMtvmf<`m%Q=dLvrlGiw$XefhPujV1B}~L$EWD{ z2^upV38tXQ4EHPx+ynL7v-AgW CjTcD( diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/noradio/PMM_1_9V/pmm1.9-25MHz_1MHz-1800it-2.csv deleted file mode 100644 index d4a96b58f969a5b2b26f8a553e73de917e5f2e6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1277 zcmY+Ey>1&p41`nfQ>e5723T_c-KB_;6iJi3fGn#JV9Sau1#q4|AJ1CDR&ml%v*d7Q z?mpe_?pEJV+vEDQd)lvlo*(7Q=5$^^+#a`o&fERwQY;-{H9$jhFCmGg2^=Ox z6<~B=0XQ5qq*w`A%r3x^02Y(PK!BWxBS}e7O0A)Y=>#^)BTLo==o}ea=wD+E(0Rpi z3!tVdIXbXHR!gJGKe>e_IxZb+$x>Tmv~yg5sYr!G?JacCK7pf1L!wmQwr+q}u~`p8 zv|WIWv8|$9Ux2jM2q-10BfvoGL^8KW^j%06-v&0VW$79N!s+y;YnPr;x*^7erGhHb ziv~5(X-;Q_4ynX9QZ5Q{mgW0M0abLmGhj8~nqUT!AI8W&I@J<1i%xq6ifhCpjGj%Q zJO;Z&YXKTM9n#oQSIu+eneo2L1nOK=QJ`{jQ9zNGImTAiQwL4Zh^b^tO)Y4XX_Xqv zXfo(x&t0dSRO=TtE-duL(<81XFn`N{>gf)1IMY4&1q(yzhtOcN^gVHh3uhhxEtsce#9%7ZIIZ5H5mLAIm4*@w>eyR*55}W2JNF29FbkFw z%wyph#PH4xymU5odDBoC-Waw#ioPx6O$i1%O$ROG fv~`|T6uk6xn7RSH0$ z|GPAHWdCekik6T?^#Ux3z@n0xcRT|LN>NI!p@?DvTawZ_45OoYM@S)=8f&O>X~;(; zsi{ip!{I$H>e`DzV*JN~IJ=O|7TETTFL)ROv2JqQH6ZIaQjMy)#WC56?4mh(t!NRzR0&8Js4Hljh#j3Nr9r zkvrq>2^$x2lo*w&!A2BlATg{nN+>-B251_G>K)oR9+B-%gJ4e>s##E#=^e!&xN{cH zo_NTpi)WBOsRr&o?L&8msVLQ)?;&`OP8ZR=GgrBAR@COIIe0ASUV4_mU?`Xj3N?34~!HRst z$M;BG-RRhiPp9!PeIK`nYtj4tbQ53B$K&Jc`^cZ&^J#n^*goujeke=e%e$)E<8kwW z_jZ#~4-&Nu^NCr9n5)IqYt&r$klbUcCFWeh)&DNfW_@T(O zi3K|}SKf#WgtT$h6jIc*fD0w9v=j?&Q5VbHH!A|TloWDQUBK1L)LLUv2Un$uRtOD% zYfhm=l?B`ez>Pr^fiTxbW%tnn%8z`{W>7{E4Es8Cbd)H_v zjE)1Gyl0AZFK<#qk1)-L-z`Ua%E}&iAM<8l3<>eX(1JywSw9|NV`PwIY}Aa$X~9v? zsNcrg0j%o_DKs}|$}wG<=R^3SN^x!)4+7V+sbI6$O9}sQ{>>W{c&7T@H3($ONWq$O zX9OnXUR0={b4WNuMsvVsS>`H3p&uD);zerC0h!E_3o-Jw1p%@Q7i{xN4cigy94Obp zdF$+96LcWUP2&*n>J}PIYW}aQ^CaAj&iZh(KjMNe$Fc4%2^O=i`=$=DI@dC~Vn3D# zV6jScUe4Jn-{#^)kl=TgfDg;K1qTo%zV*t!qrx{@J%%@ary9iKI&j7UvAB2_iwI|6 zG!*e6N=X{{ldSWWYWT!ZNw$SST`w7b*3<&Vtm78TBvt$wp29FY>`=?jZLI}mKNr#J TazzWB(C+fUpOYbmuonISBVoElp)621akW9lVSP!Kgo#VpjSQ_q$vT?=OF zRmg)?kBY`rBp2$)=x(VI`?aE@5zgEw8o3~IQ*w3kZmARZE0QzXU|gg&XqG5y$S#hh zS;DPNFqc9s8Fj$|Jps(6A|LFTYfX%MooE3FUqG{?2{mZSl~F)qv6iqaPouanb}in4 z&Vi2F3~rDYi+YOtbPEq?LcLNMv<+!oBNW_KIWd?{%h)VJd1sYUJV(Itk4p(W~v7BD%OPV=~j0Inba(=O;CU@z#dS4<+Jh51CLXd4+548IXaXy}K*n_!Dz zbqGCL3_(C4j!i783CCvoC@nA^ZFKCb7(&oMsEsy?C-^yS6c3vv+`)W;^DsT~VS#vW zNra}01w#M>G3Y!F(`YabtAKbBOezGJCYFlf(k!98H-*FBLK{04t1136_?K-~{M_y~)|#Y$4Zasv diff --git a/tos/platforms/MoteISTx5/tests/tests/current-readings/radio/radioON1.csv b/tos/platforms/MoteISTx5/tests/tests/current-readings/radio/radioON1.csv deleted file mode 100644 index 33bfb0fbfa61eef4c3ef17090f6a677c41b81867..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9012 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 - **/ - -configuration PrintfAppC{ -} -implementation -{ - components MainC, PrintfP, LedsC; - components SerialPrintfC; - //components PlatformSerialC; - //ClockTestP.UartByte -> PlatformSerialC; - - PrintfP -> MainC.Boot; - PrintfP.Leds -> LedsC; -} - diff --git a/tos/platforms/MoteISTx5/tests/tests/printf-test/PrintfP.nc b/tos/platforms/MoteISTx5/tests/tests/printf-test/PrintfP.nc deleted file mode 100644 index 587114c50..000000000 --- a/tos/platforms/MoteISTx5/tests/tests/printf-test/PrintfP.nc +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Testing types and variables in tinyos - * Use UART to prinft - **/ - -#include - -module PrintfP @safe() -{ - uses interface Leds; - uses interface Boot; - } -implementation -{ - #define MHZ 1000000 - - uint32_t frequency = 12000000; //1 MHz - float dco0_max [] = {0.2, 0.36, 0.75, 1.51, 3.2, 6.0, 10.7, 19.6}; - float dco31_min [] = {0.7, 1.47, 3.17, 6.07, 12.3, 23.7, 39.0, 60.0}; - bool rangefound = FALSE; - float ratio = 1.12; - uint8_t RSELx = 0; - - void uwait(uint16_t u) { - uint16_t t0 = TA0R; - while((TA0R - t0) <= u); - } - - void printfFloat(float toBePrinted) { - uint32_t fi, f0, f1, f2; - char c; - float f = toBePrinted; - - if (f<0){ - c = '-'; f = -f; - } else { - c = ' '; - } - - // integer portion. - fi = (uint32_t) f; - - // decimal portion...get index for up to 3 decimal places. - f = f - ((float) fi); - f0 = f*10; f0 %= 10; - f1 = f*100; f1 %= 10; - f2 = f*1000; f2 %= 10; - printf("\n\n%c%ld.%d%d%d", c, fi, (uint8_t) f0, (uint8_t) f1, (uint8_t) f2); - } - - event void Boot.booted(){ - - printf("Searching RSELx for the frequency of %d MHz.\n", (uint8_t)(frequency/MHZ)); - while(!rangefound){ - if((frequency >= (uint32_t)((dco0_max[RSELx]*ratio)*MHZ)) && (frequency < (uint32_t)((dco31_min[RSELx]/ratio)*MHZ))){ - rangefound = TRUE; - printf("RSELx found. Use RSELx = %d!\n", RSELx); - } - else{ - RSELx++; - printf("Try RSELx = %d...\n", RSELx); - } - } - } -} - diff --git a/tos/platforms/MoteISTx5/.platform b/tos/platforms/moteist5/.platform similarity index 100% rename from tos/platforms/MoteISTx5/.platform rename to tos/platforms/moteist5/.platform diff --git a/tos/platforms/MoteISTx5/ActiveMessageC.nc b/tos/platforms/moteist5/ActiveMessageC.nc similarity index 100% rename from tos/platforms/MoteISTx5/ActiveMessageC.nc rename to tos/platforms/moteist5/ActiveMessageC.nc diff --git a/tos/platforms/MoteISTx5/Ieee154MessageC.nc b/tos/platforms/moteist5/Ieee154MessageC.nc similarity index 100% rename from tos/platforms/MoteISTx5/Ieee154MessageC.nc rename to tos/platforms/moteist5/Ieee154MessageC.nc diff --git a/tos/platforms/MoteISTx5/LocalIeeeEui64C.nc b/tos/platforms/moteist5/LocalIeeeEui64C.nc similarity index 100% rename from tos/platforms/MoteISTx5/LocalIeeeEui64C.nc rename to tos/platforms/moteist5/LocalIeeeEui64C.nc diff --git a/tos/platforms/MoteISTx5/PlatformC.nc b/tos/platforms/moteist5/PlatformC.nc similarity index 100% rename from tos/platforms/MoteISTx5/PlatformC.nc rename to tos/platforms/moteist5/PlatformC.nc diff --git a/tos/platforms/MoteISTx5/PlatformP.nc b/tos/platforms/moteist5/PlatformP.nc similarity index 100% rename from tos/platforms/MoteISTx5/PlatformP.nc rename to tos/platforms/moteist5/PlatformP.nc diff --git a/tos/platforms/MoteISTx5/chips/adg715/ADG715C.nc b/tos/platforms/moteist5/chips/adg715/ADG715C.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/adg715/ADG715C.nc rename to tos/platforms/moteist5/chips/adg715/ADG715C.nc diff --git a/tos/platforms/MoteISTx5/chips/adg715/ADG715P.nc b/tos/platforms/moteist5/chips/adg715/ADG715P.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/adg715/ADG715P.nc rename to tos/platforms/moteist5/chips/adg715/ADG715P.nc diff --git a/tos/platforms/MoteISTx5/chips/cc2420/HplCC2420AlarmC.nc b/tos/platforms/moteist5/chips/cc2420/HplCC2420AlarmC.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/cc2420/HplCC2420AlarmC.nc rename to tos/platforms/moteist5/chips/cc2420/HplCC2420AlarmC.nc diff --git a/tos/platforms/MoteISTx5/chips/cc2420/HplCC2420InterruptsC.nc b/tos/platforms/moteist5/chips/cc2420/HplCC2420InterruptsC.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/cc2420/HplCC2420InterruptsC.nc rename to tos/platforms/moteist5/chips/cc2420/HplCC2420InterruptsC.nc diff --git a/tos/platforms/MoteISTx5/chips/cc2420/HplCC2420PinsC.nc b/tos/platforms/moteist5/chips/cc2420/HplCC2420PinsC.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/cc2420/HplCC2420PinsC.nc rename to tos/platforms/moteist5/chips/cc2420/HplCC2420PinsC.nc diff --git a/tos/platforms/MoteISTx5/chips/cc2420/HplCC2420SpiC.nc b/tos/platforms/moteist5/chips/cc2420/HplCC2420SpiC.nc similarity index 100% rename from tos/platforms/MoteISTx5/chips/cc2420/HplCC2420SpiC.nc rename to tos/platforms/moteist5/chips/cc2420/HplCC2420SpiC.nc diff --git a/tos/platforms/MoteISTx5/hardware.h b/tos/platforms/moteist5/hardware.h similarity index 100% rename from tos/platforms/MoteISTx5/hardware.h rename to tos/platforms/moteist5/hardware.h diff --git a/tos/platforms/MoteISTx5/hardware/adc/DemoSensorC.nc b/tos/platforms/moteist5/hardware/adc/DemoSensorC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/adc/DemoSensorC.nc rename to tos/platforms/moteist5/hardware/adc/DemoSensorC.nc diff --git a/tos/platforms/MoteISTx5/hardware/adc/DemoSensorNowC.nc b/tos/platforms/moteist5/hardware/adc/DemoSensorNowC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/adc/DemoSensorNowC.nc rename to tos/platforms/moteist5/hardware/adc/DemoSensorNowC.nc diff --git a/tos/platforms/MoteISTx5/hardware/adc/DemoSensorStreamC.nc b/tos/platforms/moteist5/hardware/adc/DemoSensorStreamC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/adc/DemoSensorStreamC.nc rename to tos/platforms/moteist5/hardware/adc/DemoSensorStreamC.nc diff --git a/tos/platforms/MoteISTx5/hardware/adc/PlatformAdcC.nc b/tos/platforms/moteist5/hardware/adc/PlatformAdcC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/adc/PlatformAdcC.nc rename to tos/platforms/moteist5/hardware/adc/PlatformAdcC.nc diff --git a/tos/platforms/MoteISTx5/hardware/adc/VoltageC.nc b/tos/platforms/moteist5/hardware/adc/VoltageC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/adc/VoltageC.nc rename to tos/platforms/moteist5/hardware/adc/VoltageC.nc diff --git a/tos/platforms/MoteISTx5/hardware/buttons/HplUserButtonC.nc b/tos/platforms/moteist5/hardware/buttons/HplUserButtonC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/buttons/HplUserButtonC.nc rename to tos/platforms/moteist5/hardware/buttons/HplUserButtonC.nc diff --git a/tos/platforms/MoteISTx5/hardware/buttons/SwitchToggleC.nc b/tos/platforms/moteist5/hardware/buttons/SwitchToggleC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/buttons/SwitchToggleC.nc rename to tos/platforms/moteist5/hardware/buttons/SwitchToggleC.nc diff --git a/tos/platforms/MoteISTx5/hardware/buttons/UserButton.h b/tos/platforms/moteist5/hardware/buttons/UserButton.h similarity index 100% rename from tos/platforms/MoteISTx5/hardware/buttons/UserButton.h rename to tos/platforms/moteist5/hardware/buttons/UserButton.h diff --git a/tos/platforms/MoteISTx5/hardware/buttons/UserButtonC.nc b/tos/platforms/moteist5/hardware/buttons/UserButtonC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/buttons/UserButtonC.nc rename to tos/platforms/moteist5/hardware/buttons/UserButtonC.nc diff --git a/tos/platforms/MoteISTx5/hardware/buttons/UserButtonP.nc b/tos/platforms/moteist5/hardware/buttons/UserButtonP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/buttons/UserButtonP.nc rename to tos/platforms/moteist5/hardware/buttons/UserButtonP.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/FreqControl.nc b/tos/platforms/moteist5/hardware/clock/FreqControl.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/FreqControl.nc rename to tos/platforms/moteist5/hardware/clock/FreqControl.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/Msp430FreqControlC.nc b/tos/platforms/moteist5/hardware/clock/Msp430FreqControlC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/Msp430FreqControlC.nc rename to tos/platforms/moteist5/hardware/clock/Msp430FreqControlC.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/Msp430FreqControlP.nc b/tos/platforms/moteist5/hardware/clock/Msp430FreqControlP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/Msp430FreqControlP.nc rename to tos/platforms/moteist5/hardware/clock/Msp430FreqControlP.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/Msp430XV2ClockControlP.nc b/tos/platforms/moteist5/hardware/clock/Msp430XV2ClockControlP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/Msp430XV2ClockControlP.nc rename to tos/platforms/moteist5/hardware/clock/Msp430XV2ClockControlP.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/PlatformClockC.nc b/tos/platforms/moteist5/hardware/clock/PlatformClockC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/PlatformClockC.nc rename to tos/platforms/moteist5/hardware/clock/PlatformClockC.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/PlatformClockP.nc b/tos/platforms/moteist5/hardware/clock/PlatformClockP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/PlatformClockP.nc rename to tos/platforms/moteist5/hardware/clock/PlatformClockP.nc diff --git a/tos/platforms/MoteISTx5/hardware/clock/freq_control_const.h b/tos/platforms/moteist5/hardware/clock/freq_control_const.h similarity index 100% rename from tos/platforms/MoteISTx5/hardware/clock/freq_control_const.h rename to tos/platforms/moteist5/hardware/clock/freq_control_const.h diff --git a/tos/platforms/MoteISTx5/hardware/leds/LedsC.nc b/tos/platforms/moteist5/hardware/leds/LedsC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/leds/LedsC.nc rename to tos/platforms/moteist5/hardware/leds/LedsC.nc diff --git a/tos/platforms/MoteISTx5/hardware/leds/LedsP.nc b/tos/platforms/moteist5/hardware/leds/LedsP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/leds/LedsP.nc rename to tos/platforms/moteist5/hardware/leds/LedsP.nc diff --git a/tos/platforms/MoteISTx5/hardware/leds/PlatformLedsC.nc b/tos/platforms/moteist5/hardware/leds/PlatformLedsC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/leds/PlatformLedsC.nc rename to tos/platforms/moteist5/hardware/leds/PlatformLedsC.nc diff --git a/tos/platforms/MoteISTx5/hardware/leds/PlatformLedsP.nc b/tos/platforms/moteist5/hardware/leds/PlatformLedsP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/leds/PlatformLedsP.nc rename to tos/platforms/moteist5/hardware/leds/PlatformLedsP.nc diff --git a/tos/platforms/MoteISTx5/hardware/pins/PlatformPinsC.nc b/tos/platforms/moteist5/hardware/pins/PlatformPinsC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/pins/PlatformPinsC.nc rename to tos/platforms/moteist5/hardware/pins/PlatformPinsC.nc diff --git a/tos/platforms/MoteISTx5/hardware/pins/PlatformPinsP.nc b/tos/platforms/moteist5/hardware/pins/PlatformPinsP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/pins/PlatformPinsP.nc rename to tos/platforms/moteist5/hardware/pins/PlatformPinsP.nc diff --git a/tos/platforms/MoteISTx5/hardware/pmm/Msp430PmmC.nc b/tos/platforms/moteist5/hardware/pmm/Msp430PmmC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/pmm/Msp430PmmC.nc rename to tos/platforms/moteist5/hardware/pmm/Msp430PmmC.nc diff --git a/tos/platforms/MoteISTx5/hardware/pmm/Msp430PmmP.nc b/tos/platforms/moteist5/hardware/pmm/Msp430PmmP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/pmm/Msp430PmmP.nc rename to tos/platforms/moteist5/hardware/pmm/Msp430PmmP.nc diff --git a/tos/platforms/MoteISTx5/hardware/pmm/Pmm.nc b/tos/platforms/moteist5/hardware/pmm/Pmm.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/pmm/Pmm.nc rename to tos/platforms/moteist5/hardware/pmm/Pmm.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformI2CC.nc b/tos/platforms/moteist5/hardware/usci/PlatformI2CC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformI2CC.nc rename to tos/platforms/moteist5/hardware/usci/PlatformI2CC.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformI2CP.nc b/tos/platforms/moteist5/hardware/usci/PlatformI2CP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformI2CP.nc rename to tos/platforms/moteist5/hardware/usci/PlatformI2CP.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformSerialC.nc b/tos/platforms/moteist5/hardware/usci/PlatformSerialC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformSerialC.nc rename to tos/platforms/moteist5/hardware/usci/PlatformSerialC.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformSerialP.nc b/tos/platforms/moteist5/hardware/usci/PlatformSerialP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformSerialP.nc rename to tos/platforms/moteist5/hardware/usci/PlatformSerialP.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformSpiC.nc b/tos/platforms/moteist5/hardware/usci/PlatformSpiC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformSpiC.nc rename to tos/platforms/moteist5/hardware/usci/PlatformSpiC.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformSpiP.nc b/tos/platforms/moteist5/hardware/usci/PlatformSpiP.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformSpiP.nc rename to tos/platforms/moteist5/hardware/usci/PlatformSpiP.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/PlatformUsciMapC.nc b/tos/platforms/moteist5/hardware/usci/PlatformUsciMapC.nc similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/PlatformUsciMapC.nc rename to tos/platforms/moteist5/hardware/usci/PlatformUsciMapC.nc diff --git a/tos/platforms/MoteISTx5/hardware/usci/msp430usci.h b/tos/platforms/moteist5/hardware/usci/msp430usci.h similarity index 100% rename from tos/platforms/MoteISTx5/hardware/usci/msp430usci.h rename to tos/platforms/moteist5/hardware/usci/msp430usci.h diff --git a/tos/platforms/MoteISTx5/platform.h b/tos/platforms/moteist5/platform.h similarity index 100% rename from tos/platforms/MoteISTx5/platform.h rename to tos/platforms/moteist5/platform.h diff --git a/tos/platforms/MoteISTx5/platform_message.h b/tos/platforms/moteist5/platform_message.h similarity index 100% rename from tos/platforms/MoteISTx5/platform_message.h rename to tos/platforms/moteist5/platform_message.h