diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-03-31 13:21:25 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-03-31 13:21:25 -0600 |
commit | 0d085198e9bafae34dcb77d1e75305785f1e5d08 (patch) | |
tree | 335f2ab4a732bac3b6b61ea9394e93241d3183eb /nuttx/include | |
parent | 6fcc161c79d4e24444997e35e5a37d7aff6049b9 (diff) | |
download | px4-nuttx-0d085198e9bafae34dcb77d1e75305785f1e5d08.tar.gz px4-nuttx-0d085198e9bafae34dcb77d1e75305785f1e5d08.tar.bz2 px4-nuttx-0d085198e9bafae34dcb77d1e75305785f1e5d08.zip |
rch_tcinitialize() and arch_tcunitinitialize() renamed to board_tsc_setup() and board_tsc_teardown(). These are not long called directly by applications but only indirectly throught the crappy boardctl() OS interface.
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/board.h | 54 | ||||
-rw-r--r-- | nuttx/include/nuttx/input/touchscreen.h | 38 | ||||
-rw-r--r-- | nuttx/include/sys/boardctl.h | 18 |
3 files changed, 65 insertions, 45 deletions
diff --git a/nuttx/include/nuttx/board.h b/nuttx/include/nuttx/board.h index cfbbb8331..2942b0217 100644 --- a/nuttx/include/nuttx/board.h +++ b/nuttx/include/nuttx/board.h @@ -142,7 +142,59 @@ void board_initialize(void); #ifdef CONFIG_LIB_BOARDCTL int board_app_initialize(void); -#endif +#endif /* CONFIG_LIB_BOARDCTL */ + +/**************************************************************************** + * Name: board_tsc_setup + * + * Description: + * Each board that supports a touchscreen device must provide this function. + * This function is called by application-specific, setup logic to + * configure the touchscreen device. This function will register the driver + * as /dev/inputN where N is the minor device number. + * + * This is an internal OS interface but may be invoked indirectly from + * application-level touchscreen testing logic (perhaps by + * apps/examples/touchscreen). If CONFIG_LIB_BOARDCTL=y and + * CONFIG_BOARDCTL_TSCTEST=y, then this functions will be invoked via the + * (non-standard) boardctl() interface using the commands + * BOARDIOC_TSCTEST_SETUP command. + * + * Input Parameters: + * minor - The input device minor number + * + * Returned Value: + * Zero is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +int board_tsc_setup(int minor); + +/**************************************************************************** + * Name: board_tsc_teardown + * + * Description: + * Each board that supports a touchscreen device must provide this function. + * This function is called by application-specific, setup logic to + * uninitialize the touchscreen device. + * + * This is an internal OS interface but may be invoked indirectly from + * application-level touchscreen testing logic (perhaps by + * apps/examples/touchscreen). If CONFIG_LIB_BOARDCTL=y and + * CONFIG_BOARDCTL_TSCTEST=y, then this functions will be invoked via the + * (non-standard) boardctl() interface using the commands + * BOARDIOC_TSCTEST_TEARDOWN command. + * + * Input Parameters: + * None + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void board_tsc_teardown(void); /**************************************************************************** * Name: board_led_initialize diff --git a/nuttx/include/nuttx/input/touchscreen.h b/nuttx/include/nuttx/input/touchscreen.h index d9e531d5f..dcd91b4d5 100644 --- a/nuttx/include/nuttx/input/touchscreen.h +++ b/nuttx/include/nuttx/input/touchscreen.h @@ -134,44 +134,6 @@ extern "C" #define EXTERN extern #endif -/**************************************************************************** - * Name: arch_tcinitialize - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * configure the touchscreen device. This function will register the driver - * as /dev/inputN where N is the minor device number. - * - * Input Parameters: - * minor - The input device minor number - * - * Returned Value: - * Zero is returned on success. Otherwise, a negated errno value is - * returned to indicate the nature of the failure. - * - ****************************************************************************/ - -int arch_tcinitialize(int minor); - -/**************************************************************************** - * Name: arch_tcuninitialize - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void arch_tcuninitialize(void); - #undef EXTERN #ifdef __cplusplus } diff --git a/nuttx/include/sys/boardctl.h b/nuttx/include/sys/boardctl.h index 811953e08..675daa802 100644 --- a/nuttx/include/sys/boardctl.h +++ b/nuttx/include/sys/boardctl.h @@ -58,16 +58,22 @@ * CONFIGURATION: CONFIG_LIB_BOARDCTL * DEPENDENCIES: Board logic must provide board_app_initialization * - * CMD: BOARDIOC_TSCTEST + * CMD: BOARDIOC_TSCTEST_SETUP * DESCRIPTION: Touchscreen controller test configuration - * ARG: 0: Setup touchscreen test, 1: Teardown touchscreen test + * ARG: Touch controller device minor number * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST - * DEPENDENCIES: Board logic must provide board_tsc_setup() and - * board_tsc_teardown(). + * DEPENDENCIES: Board logic must provide board_tsc_setup() + * + * CMD: BOARDIOC_TSCTEST_TEARDOWN + * DESCRIPTION: Touchscreen controller test configuration + * ARG: None + * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST + * DEPENDENCIES: Board logic must provide board_tsc_teardown() */ -#define BOARDIOC_INIT _BOARDIOC(0x0001) -#define BOARDIOC_TSCTEST _BOARDIOC(0x0002) +#define BOARDIOC_INIT _BOARDIOC(0x0001) +#define BOARDIOC_TSCTEST_SETUP _BOARDIOC(0x0002) +#define BOARDIOC_TSCTEST_TEARDOWN _BOARDIOC(0x0003) /**************************************************************************** * Public Type Definitions |