Remove all references to board_adc_setup()

This commit is contained in:
Gregory Nutt
2016-12-05 17:06:08 -06:00
parent 55dd1c87b3
commit ee2852f5ff
81 changed files with 732 additions and 667 deletions
+13 -2
View File
@@ -1,8 +1,7 @@
/****************************************************************************************************
* configs/cloudctrl/src/cloudctrl.h
* arch/arm/src/board/cloudctrl.n
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com>
*
@@ -255,6 +254,18 @@ void weak_function stm32_usbinitialize(void);
int stm32_usbhost_initialize(void);
#endif
/************************************************************************************
* Name: stm32_adc_setup
*
* Description:
* Initialize ADC and register the ADC driver.
*
************************************************************************************/
#ifdef CONFIG_ADC
int stm32_adc_setup(void);
#endif
/****************************************************************************
* Name: stm32_sdinitialize
*
+4 -9
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/cloudctrl/src/stm32_adc.c
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com>
*
@@ -105,24 +105,19 @@ static const uint8_t g_chanlist[ADC1_NCHANNELS] = {10}; //{10, 8, 9};
static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC12_IN10}; //{GPIO_ADC12_IN10, GPIO_ADC12_IN8, GPIO_ADC12_IN9};
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: board_adc_setup
* Name: stm32_adc_setup
*
* Description:
* All STM32 architectures must provide the following interface to work with
* examples/adc.
* Initialize ADC and register the ADC driver.
*
************************************************************************************/
int board_adc_setup(void)
int stm32_adc_setup(void)
{
#ifdef CONFIG_STM32_ADC1
static bool initialized = false;
+12 -2
View File
@@ -127,9 +127,7 @@
int board_app_initialize(uintptr_t arg)
{
#if defined(HAVE_USBHOST) || defined(HAVE_W25)
int ret;
#endif
/* Initialize and register the W25 FLASH file system. */
@@ -156,5 +154,17 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_ADC
/* Initialize ADC and register the ADC driver. */
ret = stm32_adc_setup();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret);
return ret;
}
#endif
UNUSED(ret);
return OK;
}