Rename adc_devinit() to board_adc_setup(). Add support to the boardctl() interface so that it can call board_adc_setup() on behalf of an application. Change apps/examples/adc to that is now calls boardctl() instead of adc_devinit() in order to initalize the ADC device.

This commit is contained in:
Gregory Nutt
2015-03-31 15:00:23 -06:00
parent ba169b69f9
commit 4212b9b385
23 changed files with 140 additions and 47 deletions
+17
View File
@@ -69,11 +69,28 @@
* ARG: None
* CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST
* DEPENDENCIES: Board logic must provide board_tsc_teardown()
*
* CMD: BOARDIOC_ADCTEST_SETUP
* DESCRIPTION: ADC controller test configuration
* ARG: None
* CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_ADCTEST
* DEPENDENCIES: Board logic must provide board_adc_setup()
*
*/
#define BOARDIOC_INIT _BOARDIOC(0x0001)
#define BOARDIOC_TSCTEST_SETUP _BOARDIOC(0x0002)
#define BOARDIOC_TSCTEST_TEARDOWN _BOARDIOC(0x0003)
#define BOARDIOC_ADCTEST_SETUP _BOARDIOC(0x0004)
/* If CONFIG_BOARDCTL_IOCTL=y, then boad-specific commands will be support.
* In this case, all commands not recognized by boardctl() will be forwarded
* to the board-provided board_ioctl() function.
*
* User defined board commands may begin with this value:
*/
#define BOARDIOC_USER _BOARDIOC(0x0005)
/****************************************************************************
* Public Type Definitions