aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-14 07:43:59 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-14 07:43:59 +0000
commitb7c4aae4e11b71ec5d64ff6ce839ebef403f839a (patch)
treebe49573fbfc8f4b7c96d642910bbf9543b4196d5 /testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c
parent9d246c3a41497733a78a8476d6daa0c4ae747026 (diff)
downloadChibiOS-b7c4aae4e11b71ec5d64ff6ce839ebef403f839a.tar.gz
ChibiOS-b7c4aae4e11b71ec5d64ff6ce839ebef403f839a.tar.bz2
ChibiOS-b7c4aae4e11b71ec5d64ff6ce839ebef403f839a.zip
[STM32 FSMC NAND] Testhal application cleanup.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7175 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c')
-rw-r--r--testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c b/testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c
index dc245560c..4e37b757c 100644
--- a/testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c
+++ b/testhal/STM32/STM32F4xx/FSMC_NAND/dma_storm_adc.c
@@ -39,17 +39,13 @@
#define ADC_AN33_1_OFFSET (ADC_CHANNEL_IN14 - 10)
#define ADC_AN33_2_OFFSET (ADC_CHANNEL_IN15 - 10)
-
-
static void adcerrorcallback(ADCDriver *adcp, adcerror_t err);
static void adccallback(ADCDriver *adcp, adcsample_t *buffer, size_t n);
-
-
static adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH];
-volatile uint32_t its = 0;
-volatile uint32_t errors = 0;
+static uint32_t ints = 0;
+static uint32_t errors = 0;
static const ADCConversionGroup adccg = {
TRUE,
@@ -80,23 +76,20 @@ static void adcerrorcallback(ADCDriver *adcp, adcerror_t err) {
(void)err;
osalSysHalt("");
-// chSysLockFromIsr();
-// adcStartConversionI(&ADCD1, &adccg, samples, ADC_BUF_DEPTH);
-// chSysUnlockFromIsr();
}
static void adccallback(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
(void)adcp;
(void)buffer;
(void)n;
- its++;
+ ints++;
}
/*
*
*/
void dma_storm_adc_start(void){
- its = 0;
+ ints = 0;
errors = 0;
/* Activates the ADC1 driver and the temperature sensor.*/
@@ -114,6 +107,6 @@ uint32_t dma_storm_adc_stop(void){
adcStopConversion(&ADCD1);
adcSTM32DisableTSVREFE();
adcStop(&ADCD1);
- return its;
+ return ints;
}