diff --git a/boards/arm/sama5/giant-board/src/Makefile b/boards/arm/sama5/giant-board/src/Makefile index 306635a0f5..4b4fd9f4f8 100644 --- a/boards/arm/sama5/giant-board/src/Makefile +++ b/boards/arm/sama5/giant-board/src/Makefile @@ -65,7 +65,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += sam_ajoystick.c endif endif diff --git a/boards/arm/sama5/giant-board/src/sam_ajoystick.c b/boards/arm/sama5/giant-board/src/sam_ajoystick.c index b1bbd80534..4de0e1d128 100644 --- a/boards/arm/sama5/giant-board/src/sam_ajoystick.c +++ b/boards/arm/sama5/giant-board/src/sam_ajoystick.c @@ -45,29 +45,29 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_SAMA5_ADC_CHAN0) || !defined(CONFIG_SAMA5_ADC_CHAN1) # error CONFIG_SAMA5_ADC_CHAN0 and 1 are required for Itead joystick # elif !defined(CONFIG_SAMA5_PIOC_IRQ) # error CONFIG_SAMA5_PIOC_IRQ is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_EMACA) # error EMAC conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SSC0) # error SSC0 conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SPI1) # warning SPI1 may conflict with the Itead PIO usage # elif defined(CONFIG_SAMA5_ISI) # warning ISI may conflict with the Itead PIO usage # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Number of Joystick buttons */ @@ -434,4 +434,4 @@ int sam_ajoy_initialization(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/sama5/sama5d2-xult/src/Makefile b/boards/arm/sama5/sama5d2-xult/src/Makefile index ad42340511..a7c29a3d02 100644 --- a/boards/arm/sama5/sama5d2-xult/src/Makefile +++ b/boards/arm/sama5/sama5d2-xult/src/Makefile @@ -83,7 +83,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += sam_ajoystick.c endif endif diff --git a/boards/arm/sama5/sama5d2-xult/src/sam_ajoystick.c b/boards/arm/sama5/sama5d2-xult/src/sam_ajoystick.c index 893a66af45..2613979b73 100644 --- a/boards/arm/sama5/sama5d2-xult/src/sam_ajoystick.c +++ b/boards/arm/sama5/sama5d2-xult/src/sam_ajoystick.c @@ -45,29 +45,29 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_SAMA5_ADC_CHAN0) || !defined(CONFIG_SAMA5_ADC_CHAN1) # error CONFIG_SAMA5_ADC_CHAN0 and 1 are required for Itead joystick # elif !defined(CONFIG_SAMA5_PIOC_IRQ) # error CONFIG_SAMA5_PIOC_IRQ is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_EMACA) # error EMAC conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SSC0) # error SSC0 conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SPI1) # warning SPI1 may conflict with the Itead PIO usage # elif defined(CONFIG_SAMA5_ISI) # warning ISI may conflict with the Itead PIO usage # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Number of Joystick buttons */ @@ -434,4 +434,4 @@ int sam_ajoy_initialization(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/sama5/sama5d3-xplained/README.txt b/boards/arm/sama5/sama5d3-xplained/README.txt index 01a3baa0fa..8c68bacc3d 100644 --- a/boards/arm/sama5/sama5d3-xplained/README.txt +++ b/boards/arm/sama5/sama5d3-xplained/README.txt @@ -2851,7 +2851,7 @@ Shields CONFIG_ANALOG=y : Should be automatically selected CONFIG_ADC=y : Should be automatically selected CONFIG_INPUT=y : Select input device support - CONFIG_AJOYSTICK=y : Select analog joystick support + CONFIG_INPUT_AJOYSTICK=y : Select analog joystick support System Type -> ADC Configuration CONFIG_SAMA5_ADC_CHAN0=y : These settings enable the sequencer to collect diff --git a/boards/arm/sama5/sama5d3-xplained/src/Makefile b/boards/arm/sama5/sama5d3-xplained/src/Makefile index 613183f28b..58936e0a16 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/Makefile +++ b/boards/arm/sama5/sama5d3-xplained/src/Makefile @@ -75,7 +75,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += sam_ajoystick.c endif endif diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c b/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c index befb7d7045..d7d7b54943 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c +++ b/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c @@ -45,29 +45,29 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_SAMA5_ADC_CHAN0) || !defined(CONFIG_SAMA5_ADC_CHAN1) # error CONFIG_SAMA5_ADC_CHAN0 and 1 are required for Itead joystick # elif !defined(CONFIG_SAMA5_PIOC_IRQ) # error CONFIG_SAMA5_PIOC_IRQ is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_EMACA) # error EMAC conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SSC0) # error SSC0 conflicts with the Itead PIO usage -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif defined(CONFIG_SAMA5_SPI1) # warning SPI1 may conflict with the Itead PIO usage # elif defined(CONFIG_SAMA5_ISI) # warning ISI may conflict with the Itead PIO usage # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Number of Joystick buttons */ @@ -434,4 +434,4 @@ int sam_ajoy_initialization(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/stm32/nucleo-f446re/Kconfig b/boards/arm/stm32/nucleo-f446re/Kconfig index 4d9e57a81f..bc21d54050 100644 --- a/boards/arm/stm32/nucleo-f446re/Kconfig +++ b/boards/arm/stm32/nucleo-f446re/Kconfig @@ -14,7 +14,7 @@ config NUCLEO_F446RE_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 default y if STM32_USART1 - depends on AJOYSTICK + depends on INPUT_AJOYSTICK ---help--- The Itead Joystick shield supports analog X/Y position and up to 5 buttons. Some of these buttons may conflict with other resources diff --git a/boards/arm/stm32/nucleo-f446re/README.txt b/boards/arm/stm32/nucleo-f446re/README.txt index 8045af3080..609500e794 100644 --- a/boards/arm/stm32/nucleo-f446re/README.txt +++ b/boards/arm/stm32/nucleo-f446re/README.txt @@ -488,7 +488,7 @@ Shields CONFIG_ANALOG=y : Should be automatically selected CONFIG_ADC=y : Should be automatically selected CONFIG_INPUT=y : Select input device support - CONFIG_AJOYSTICK=y : Select analog joystick support + CONFIG_INPUT_AJOYSTICK=y : Select analog joystick support There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the diff --git a/boards/arm/stm32/nucleo-f446re/src/Make.defs b/boards/arm/stm32/nucleo-f446re/src/Make.defs index dfd0438085..3d3698c012 100644 --- a/boards/arm/stm32/nucleo-f446re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f446re/src/Make.defs @@ -34,7 +34,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += stm32_ajoystick.c endif endif diff --git a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h index a74ba44825..f3ff868583 100644 --- a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h +++ b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h @@ -300,7 +300,7 @@ int stm32_can_setup(void); * ****************************************************************************/ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK int board_ajoy_initialize(void); #endif diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_adc.c b/boards/arm/stm32/nucleo-f446re/src/stm32_adc.c index cea709de19..f5640876f8 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_adc.c @@ -57,7 +57,7 @@ /* Identifying number of each ADC channel. */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK #ifdef CONFIG_ADC_DMA /* The Itead analog joystick gets inputs on ADC_IN0 and ADC_IN1 */ @@ -92,7 +92,7 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = }; #endif /* CONFIG_ADC_DMA */ -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ /**************************************************************************** * Public Functions diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c b/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c index fbe0d88bf7..672e54a03b 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c @@ -45,17 +45,17 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_STM32_ADC1) # error CONFIG_STM32_ADC1 is required for Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* A no-ADC, buttons only version can be built for testing */ @@ -485,4 +485,4 @@ int board_ajoy_initialize(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c index eb3894dcf9..6e9ae98078 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c @@ -145,7 +145,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Initialize and register the joystick driver */ ret = board_ajoy_initialize(); diff --git a/boards/arm/stm32/nucleo-f4x1re/Kconfig b/boards/arm/stm32/nucleo-f4x1re/Kconfig index f68500d500..e23c137608 100644 --- a/boards/arm/stm32/nucleo-f4x1re/Kconfig +++ b/boards/arm/stm32/nucleo-f4x1re/Kconfig @@ -14,7 +14,7 @@ config NUCLEO_F401RE_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 default y if STM32_USART1 - depends on AJOYSTICK + depends on INPUT_AJOYSTICK ---help--- The Itead Joystick shield supports analog X/Y position and up to 5 buttons. Some of these buttons may conflict with other resources diff --git a/boards/arm/stm32/nucleo-f4x1re/README.txt b/boards/arm/stm32/nucleo-f4x1re/README.txt index 30e514e547..e6082f050a 100644 --- a/boards/arm/stm32/nucleo-f4x1re/README.txt +++ b/boards/arm/stm32/nucleo-f4x1re/README.txt @@ -513,7 +513,7 @@ Shields CONFIG_ANALOG=y : Should be automatically selected CONFIG_ADC=y : Should be automatically selected CONFIG_INPUT=y : Select input device support - CONFIG_AJOYSTICK=y : Select analog joystick support + CONFIG_INPUT_AJOYSTICK=y : Select analog joystick support There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the diff --git a/boards/arm/stm32/nucleo-f4x1re/src/Make.defs b/boards/arm/stm32/nucleo-f4x1re/src/Make.defs index 8354e313ca..5a5daae9d2 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f4x1re/src/Make.defs @@ -34,7 +34,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += stm32_ajoystick.c endif endif diff --git a/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h b/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h index 24699f4e0e..cd0469789a 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h +++ b/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h @@ -295,7 +295,7 @@ int stm32_adc_setup(void); * ****************************************************************************/ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK int board_ajoy_initialize(void); #endif diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c index 3bb66a2569..e741061d53 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c @@ -58,7 +58,7 @@ /* Identifying number of each ADC channel. */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK #ifdef CONFIG_ADC_DMA /* The Itead analog joystick gets inputs on ADC_IN0 and ADC_IN1 */ @@ -92,7 +92,7 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = }; #endif /* CONFIG_ADC_DMA */ -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ /**************************************************************************** * Public Functions diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c index aac34e81f8..5da929ca79 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c @@ -45,17 +45,17 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_STM32_ADC1) # error CONFIG_STM32_ADC1 is required for Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* A no-ADC, buttons only version can be built for testing */ @@ -484,4 +484,4 @@ int board_ajoy_initialize(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_bringup.c index c6899e176b..1983d26dc3 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_bringup.c @@ -150,7 +150,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Initialize and register the joystick driver */ ret = board_ajoy_initialize(); diff --git a/boards/arm/stm32l4/nucleo-l476rg/Kconfig b/boards/arm/stm32l4/nucleo-l476rg/Kconfig index 7361b3f490..95404d571e 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/Kconfig +++ b/boards/arm/stm32l4/nucleo-l476rg/Kconfig @@ -9,7 +9,7 @@ config NUCLEO_L476RG_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 default y if STM32_USART1 - depends on AJOYSTICK + depends on INPUT_AJOYSTICK ---help--- The Itead Joystick shield supports analog X/Y position and up to 5 buttons. Some of these buttons may conflict with other resources diff --git a/boards/arm/stm32l4/nucleo-l476rg/README.txt b/boards/arm/stm32l4/nucleo-l476rg/README.txt index 92cd2fed48..be6df33f17 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/README.txt +++ b/boards/arm/stm32l4/nucleo-l476rg/README.txt @@ -488,7 +488,7 @@ Shields CONFIG_ANALOG=y : Should be automatically selected CONFIG_ADC=y : Should be automatically selected CONFIG_INPUT=y : Select input device support - CONFIG_AJOYSTICK=y : Select analog joystick support + CONFIG_INPUT_AJOYSTICK=y : Select analog joystick support There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/Makefile b/boards/arm/stm32l4/nucleo-l476rg/src/Makefile index 829352b3c4..0014486d7c 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/Makefile +++ b/boards/arm/stm32l4/nucleo-l476rg/src/Makefile @@ -38,7 +38,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += stm32_ajoystick.c endif endif diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h b/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h index cc51cc3bdb..f5702b121f 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h +++ b/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h @@ -372,7 +372,7 @@ int stm32l4_adc_setup(void); * ****************************************************************************/ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK int board_ajoy_initialize(void); #endif diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c index 9cee00c570..203462dd47 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c @@ -57,7 +57,7 @@ /* Identifying number of each ADC channel. */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK #ifdef CONFIG_ADC_DMA /* The Itead analog joystick gets inputs on ADC_IN1 and ADC_IN2 */ @@ -93,7 +93,7 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = }; #endif /* CONFIG_ADC_DMA */ -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ /**************************************************************************** * Private Functions diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_ajoystick.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_ajoystick.c index 2ba712137e..af6dafec82 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_ajoystick.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_ajoystick.c @@ -44,17 +44,17 @@ /* Check for pre-requisites and pin conflicts */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK # if !defined(CONFIG_ADC) # error CONFIG_ADC is required for the Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # elif !defined(CONFIG_STM32L4_ADC1) # error CONFIG_STM32L4_ADC1 is required for Itead joystick -# undef CONFIG_AJOYSTICK +# undef CONFIG_INPUT_AJOYSTICK # endif -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* A no-ADC, buttons only version can be built for testing */ @@ -484,4 +484,4 @@ int board_ajoy_initialize(void) return ret; } -#endif /* CONFIG_AJOYSTICK */ +#endif /* CONFIG_INPUT_AJOYSTICK */ diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c index eaad5ab17b..7478af2d80 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c @@ -288,7 +288,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Initialize and register the joystick driver */ ret = board_ajoy_initialize(); diff --git a/boards/arm/stm32l4/stm32l476vg-disco/README.txt b/boards/arm/stm32l4/stm32l476vg-disco/README.txt index 4427dc0961..ba86388a64 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/README.txt +++ b/boards/arm/stm32l4/stm32l476vg-disco/README.txt @@ -315,7 +315,7 @@ Shields CONFIG_ANALOG=y : Should be automatically selected CONFIG_ADC=y : Should be automatically selected CONFIG_INPUT=y : Select input device support - CONFIG_AJOYSTICK=y : Select analog joystick support + CONFIG_INPUT_AJOYSTICK=y : Select analog joystick support There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index 772f30c732..9db66b0b58 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -250,7 +250,7 @@ int sim_bringup(void) } #endif -#ifdef CONFIG_AJOYSTICK +#ifdef CONFIG_INPUT_AJOYSTICK /* Initialize the simulated analog joystick input device */ sim_ajoy_initialize(); diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index e6b6a44476..aca337918e 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -490,7 +490,7 @@ config INPUT_DJOYSTICK_NPOLLWAITERS endif # INPUT_DJOYSTICK -config AJOYSTICK +config INPUT_AJOYSTICK bool "Analog Joystick" default n ---help--- @@ -500,13 +500,13 @@ config AJOYSTICK to-Digital Conversion (ADC). The analog positional data may also be accompanied by discrete button data. -if AJOYSTICK +if INPUT_AJOYSTICK -config AJOYSTICK_NPOLLWAITERS +config INPUT_AJOYSTICK_NPOLLWAITERS int "Max Number of Poll Waiters" default 2 -endif # AJOYSTICK +endif # INPUT_AJOYSTICK config INPUT_NUNCHUCK bool "Nintendo Wii Nunchuck Joystick (White Model)" diff --git a/drivers/input/Make.defs b/drivers/input/Make.defs index f1b56dda84..218963dd5e 100644 --- a/drivers/input/Make.defs +++ b/drivers/input/Make.defs @@ -76,7 +76,7 @@ ifeq ($(CONFIG_INPUT_DJOYSTICK),y) CSRCS += djoystick.c endif -ifeq ($(CONFIG_AJOYSTICK),y) +ifeq ($(CONFIG_INPUT_AJOYSTICK),y) CSRCS += ajoystick.c endif diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index cd0908753a..c3b623549d 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -99,7 +99,7 @@ struct ajoy_open_s * driver events. */ - FAR struct pollfd *ao_fds[CONFIG_AJOYSTICK_NPOLLWAITERS]; + FAR struct pollfd *ao_fds[CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS]; }; /**************************************************************************** @@ -192,7 +192,7 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv) { /* Are there any poll waiters? */ - for (i = 0; i < CONFIG_AJOYSTICK_NPOLLWAITERS; i++) + for (i = 0; i < CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS; i++) { if (opriv->ao_fds[i]) { @@ -299,7 +299,7 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv) { /* Yes.. Notify all waiters */ - for (i = 0; i < CONFIG_AJOYSTICK_NPOLLWAITERS; i++) + for (i = 0; i < CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS; i++) { FAR struct pollfd *fds = opriv->ao_fds[i]; if (fds) @@ -708,7 +708,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, * slot for the poll structure reference */ - for (i = 0; i < CONFIG_AJOYSTICK_NPOLLWAITERS; i++) + for (i = 0; i < CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS; i++) { /* Find an available slot */ @@ -722,7 +722,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, } } - if (i >= CONFIG_AJOYSTICK_NPOLLWAITERS) + if (i >= CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS) { ierr("ERROR: Too man poll waiters\n"); fds->priv = NULL; diff --git a/include/nuttx/input/ajoystick.h b/include/nuttx/input/ajoystick.h index fa1122f192..a2d0c5db6e 100644 --- a/include/nuttx/input/ajoystick.h +++ b/include/nuttx/input/ajoystick.h @@ -51,8 +51,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_AJOYSTICK_NPOLLWAITERS -# define CONFIG_AJOYSTICK_NPOLLWAITERS 2 +#ifndef CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS +# define CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS 2 #endif /* Joystick Interface *******************************************************/