diff --git a/drivers/analog/Kconfig b/drivers/analog/Kconfig index 5c68f518e7e..20d99f8acb4 100644 --- a/drivers/analog/Kconfig +++ b/drivers/analog/Kconfig @@ -11,6 +11,16 @@ config ADC not only Analog-to-Digital Converters (ADC) but also amplifiers and analog multiplexers. + This selection enables: + + - The upper half, device-independent ADC character driver, and + - Selection of common lower half ADC drivers. + + MCU-specific, lower half drivers may be selected independently of + CONFIG_ADC. However, if CONFIG_ADC is selected, then it is assume + that lower half ADC drivers will be used only with the commoun ADC + upper half driver. + if ADC config ADC_FIFOSIZE diff --git a/include/nuttx/analog/adc.h b/include/nuttx/analog/adc.h index f08687a5a42..0044c03364d 100644 --- a/include/nuttx/analog/adc.h +++ b/include/nuttx/analog/adc.h @@ -1,10 +1,10 @@ /************************************************************************************ * include/nuttx/analog/adc.h * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Li Zhuoyi. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-04 initial version - * 0.2 remove ao_read + * Gregory Nutt * * Derived from include/nuttx/can.h * @@ -186,11 +186,7 @@ struct adc_dev_s }; /************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions + * Public Function Prototypes ************************************************************************************/ #if defined(__cplusplus) @@ -201,6 +197,7 @@ extern "C" /************************************************************************************ * "Upper-Half" ADC Driver Interfaces ************************************************************************************/ + /************************************************************************************ * Name: adc_register * @@ -228,6 +225,7 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev); /************************************************************************************ * Platform-Independent "Lower Half" ADC Driver Interfaces ************************************************************************************/ + /************************************************************************************ * Name: up_ads1255initialize * @@ -236,7 +234,8 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev); * ************************************************************************************/ -FAR struct adc_dev_s *up_ads1255initialize(FAR struct spi_dev_s *spi, unsigned int devno); +FAR struct adc_dev_s *up_ads1255initialize(FAR struct spi_dev_s *spi, + unsigned int devno); #if defined(__cplusplus) } diff --git a/include/nuttx/i2c/i2c_master.h b/include/nuttx/i2c/i2c_master.h index 1938bcbfa10..c3684398ee6 100644 --- a/include/nuttx/i2c/i2c_master.h +++ b/include/nuttx/i2c/i2c_master.h @@ -155,10 +155,10 @@ struct i2c_master_s; struct i2c_msg_s; struct i2c_ops_s { - int (*transfer)(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, - int count); + CODE int (*transfer)(FAR struct i2c_master_s *dev, + FAR struct i2c_msg_s *msgs, int count); #ifdef CONFIG_I2C_RESET - int (*reset)(FAR struct i2c_master_s *dev); + CODE int (*reset)(FAR struct i2c_master_s *dev); #endif };