diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-22 15:59:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-22 15:59:50 +0000 |
commit | 5b038d28629472894c07f4efc604c992c9d8264d (patch) | |
tree | 63468d1d6ac45b29fbd91bfc9b9e1d7d6d7b17c0 /nuttx/configs/stm3210e-eval/src/up_adc.c | |
parent | 0404da840332858afad5ecbfcba1290c191f0078 (diff) | |
download | px4-nuttx-5b038d28629472894c07f4efc604c992c9d8264d.tar.gz px4-nuttx-5b038d28629472894c07f4efc604c992c9d8264d.tar.bz2 px4-nuttx-5b038d28629472894c07f4efc604c992c9d8264d.zip |
Add loopback support to STM32 CAN driver; Add apps/examples/can loopback test
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4213 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval/src/up_adc.c')
-rw-r--r-- | nuttx/configs/stm3210e-eval/src/up_adc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_adc.c b/nuttx/configs/stm3210e-eval/src/up_adc.c index f84a88d58..fa05f547b 100644 --- a/nuttx/configs/stm3210e-eval/src/up_adc.c +++ b/nuttx/configs/stm3210e-eval/src/up_adc.c @@ -124,6 +124,11 @@ int adc_devinit(void) /* Call stm32_adcinitialize() to get an instance of the ADC interface */ adc = stm32_adcinitialize(1, g_chanlist, ADC_NCHANNELS); + if (adc == NULL) + { + adbg("ERROR: Failed to get ADC interface\n"); + return; + } /* Register the ADC driver at "/dev/adc0" */ @@ -133,7 +138,7 @@ int adc_devinit(void) adbg("adc_register failed: %d\n", ret); } - return OK; + return ret; } #endif /* CONFIG_STM32_ADC || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */ |