drivers/input: Rename DJOYSTICK configs to INPUT_DJOYSTICK
This commit is contained in:
parent
2efae6928d
commit
3054237d2e
@ -8,7 +8,7 @@ if ARCH_BOARD_LPC4088_DEVKIT
|
||||
config LPC4088_DEVKIT_DJOYSTICK
|
||||
bool "Discrete Joystick Support"
|
||||
default n
|
||||
depends on !ARCH_BUTTONS && DJOYSTICK
|
||||
depends on !ARCH_BUTTONS && INPUT_DJOYSTICK
|
||||
|
||||
config LPC4088_DEVKIT_DJOYDEV
|
||||
string "Joystick Device"
|
||||
|
@ -8,7 +8,7 @@ if ARCH_BOARD_OPEN1788
|
||||
config OPEN1788_DJOYSTICK
|
||||
bool "Discrete Joystick Support"
|
||||
default n
|
||||
depends on !ARCH_BUTTONS && DJOYSTICK
|
||||
depends on !ARCH_BUTTONS && INPUT_DJOYSTICK
|
||||
|
||||
config OPEN1788_DJOYDEV
|
||||
string "Joystick Device"
|
||||
|
@ -17,7 +17,6 @@ CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=11934
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEV_LOOP=y
|
||||
CONFIG_DJOYSTICK=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_DJOYSTICK=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
@ -27,8 +26,8 @@ CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAPHICS_PDCURSES=y
|
||||
CONFIG_HOST_WINDOWS=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_DJOYSTICK=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LPC17_40_EXTDRAM=y
|
||||
CONFIG_LPC17_40_EXTDRAMSIZE=67108864
|
||||
|
@ -196,7 +196,7 @@
|
||||
#define BUTTON_TAMPER 0
|
||||
#define BUTTON_WKUP 1
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
# define NUM_BUTTONS 2
|
||||
#else
|
||||
# define JOYSTICK_RIGHT 2
|
||||
@ -211,7 +211,7 @@
|
||||
#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER)
|
||||
#define BUTTON_WKUP_BIT (1 << BUTTON_WKUP)
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK
|
||||
# define JOYSTICK_RIGHT_BIT (1 << JOYSTICK_RIGHT)
|
||||
# define JOYSTICK_UP_BIT (1 << JOYSTICK_UP)
|
||||
# define JOYSTICK_LEFT_BIT (1 << JOYSTICK_LEFT)
|
||||
|
@ -56,7 +56,7 @@ ifeq ($(CONFIG_AUDIO_CS4344),y)
|
||||
CSRCS += stm32_cs4344.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DJOYSTICK),y)
|
||||
ifeq ($(CONFIG_INPUT_DJOYSTICK),y)
|
||||
CSRCS += stm32_djoystick.c
|
||||
endif
|
||||
|
||||
|
@ -149,7 +149,7 @@
|
||||
|
||||
/* BUTTONS -- NOTE that all have EXTI interrupts configured */
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
# define MIN_IRQBUTTON BUTTON_TAMPER
|
||||
# define MAX_IRQBUTTON BUTTON_WKUP
|
||||
# define NUM_IRQBUTTONS 2
|
||||
@ -349,7 +349,7 @@ int stm32_cs4344_initialize(int minor);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
int stm32_djoy_initialize(void);
|
||||
#endif
|
||||
|
||||
|
@ -208,7 +208,7 @@ int stm32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
ret = stm32_djoy_initialize();
|
||||
if (ret != OK)
|
||||
{
|
||||
|
@ -50,12 +50,12 @@ static const uint32_t g_buttons[NUM_BUTTONS] =
|
||||
GPIO_BTN_TAMPER,
|
||||
GPIO_BTN_WKUP,
|
||||
|
||||
/* The Joystick is treated like the other buttons unless CONFIG_DJOYSTICK
|
||||
* is defined, then it is assumed that they should be used by the discrete
|
||||
* joystick driver.
|
||||
/* The Joystick is treated like the other buttons unless
|
||||
* CONFIG_INPUT_DJOYSTICK is defined, then it is assumed that they should
|
||||
* be used by the discrete joystick driver.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK
|
||||
GPIO_JOY_RIGHT,
|
||||
GPIO_JOY_UP,
|
||||
GPIO_JOY_LEFT,
|
||||
@ -115,7 +115,7 @@ uint32_t board_buttons(void)
|
||||
ret |= BUTTON_WKUP_BIT;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK
|
||||
if (stm32_gpioread(g_buttons[JOYSTICK_RIGHT]))
|
||||
{
|
||||
ret |= JOYSTICK_RIGHT_BIT;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "stm32_gpio.h"
|
||||
#include "olimex-stm32-p407.h"
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -293,4 +293,4 @@ int stm32_djoy_initialize(void)
|
||||
return djoy_register("/dev/djoy0", &g_djoylower);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DJOYSTICK */
|
||||
#endif /* CONFIG_INPUT_DJOYSTICK */
|
||||
|
@ -723,7 +723,7 @@ Where <subdir> is one of the following:
|
||||
Enable the DJoystick driver:
|
||||
|
||||
CONFIG_INPUT=y # Enable input driver support
|
||||
CONFIG_DJOYSTICK=y # Enable the joystick drivers
|
||||
CONFIG_INPUT_DJOYSTICK=y # Enable the joystick drivers
|
||||
# (default parameters should be okay)
|
||||
Enable the DJoystick Example:
|
||||
|
||||
|
@ -178,16 +178,16 @@
|
||||
* Joystick right -- Connected to PG.13
|
||||
* Joystick up -- Connected to PG.15
|
||||
*
|
||||
* The Joystick is treated like the other buttons unless CONFIG_DJOYSTICK
|
||||
* is defined, then it is assumed that they should be used by the discrete
|
||||
* joystick driver.
|
||||
* The Joystick is treated like the other buttons unless
|
||||
* CONFIG_INPUT_DJOYSTICK is defined, then it is assumed that they should be
|
||||
* used by the discrete joystick driver.
|
||||
*/
|
||||
|
||||
#define BUTTON_WAKEUP 0
|
||||
#define BUTTON_TAMPER 1
|
||||
#define BUTTON_KEY 2
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
# define NUM_BUTTONS 3
|
||||
#else
|
||||
# define JOYSTICK_SEL 3
|
||||
@ -203,7 +203,7 @@
|
||||
#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER)
|
||||
#define BUTTON_KEY_BIT (1 << BUTTON_KEY)
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK
|
||||
# define JOYSTICK_SEL_BIT (1 << JOYSTICK_SEL)
|
||||
# define JOYSTICK_DOWN_BIT (1 << JOYSTICK_DOWN)
|
||||
# define JOYSTICK_LEFT_BIT (1 << JOYSTICK_LEFT)
|
||||
|
@ -60,7 +60,7 @@ CSRCS += stm32_pmbuttons.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DJOYSTICK),y)
|
||||
ifeq ($(CONFIG_INPUT_DJOYSTICK),y)
|
||||
CSRCS += stm32_djoystick.c
|
||||
endif
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
/* BUTTONS -- NOTE that some have EXTI interrupts configured */
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
# define MIN_IRQBUTTON BUTTON_KEY
|
||||
# define MAX_IRQBUTTON BUTTON_KEY
|
||||
# define NUM_IRQBUTTONS (1)
|
||||
@ -351,7 +351,7 @@ void stm32_pmbuttons(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
int stm32_djoy_initialization(void);
|
||||
#endif
|
||||
|
||||
|
@ -299,7 +299,7 @@ int stm32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
/* Initialize and register the joystick driver */
|
||||
|
||||
ret = stm32_djoy_initialization();
|
||||
|
@ -48,12 +48,12 @@ static const uint32_t g_buttons[NUM_BUTTONS] =
|
||||
{
|
||||
GPIO_BTN_WAKEUP, GPIO_BTN_TAMPER, GPIO_BTN_KEY,
|
||||
|
||||
/* The Joystick is treated like the other buttons unless CONFIG_DJOYSTICK
|
||||
* is defined, then it is assumed that they should be used by the discrete
|
||||
* joystick driver.
|
||||
/* The Joystick is treated like the other buttons unless
|
||||
* CONFIG_INPUT_DJOYSTICK is defined, then it is assumed that they should
|
||||
* be used by the discrete joystick driver.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK
|
||||
GPIO_JOY_SEL, GPIO_JOY_DOWN, GPIO_JOY_LEFT, GPIO_JOY_RIGHT, GPIO_JOY_UP
|
||||
#endif
|
||||
};
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm3210e-eval.h"
|
||||
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -293,4 +293,4 @@ int stm32_djoy_initialization(void)
|
||||
return djoy_register("/dev/djoy0", &g_djoylower);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DJOYSTICK */
|
||||
#endif /* CONFIG_INPUT_DJOYSTICK */
|
||||
|
@ -67,7 +67,7 @@
|
||||
#endif
|
||||
|
||||
#define BUTTON_MIN 0
|
||||
#ifdef CONFIG_DJOYSTICK
|
||||
#ifdef CONFIG_INPUT_DJOYSTICK
|
||||
# define BUTTON_MAX 2
|
||||
#else
|
||||
# define BUTTON_MAX 7
|
||||
|
@ -472,7 +472,7 @@ config INPUT_BUTTONS_NPOLLWAITERS
|
||||
|
||||
endif # INPUT_BUTTONS
|
||||
|
||||
config DJOYSTICK
|
||||
config INPUT_DJOYSTICK
|
||||
bool "Discrete Joystick"
|
||||
default n
|
||||
---help---
|
||||
@ -482,13 +482,13 @@ config DJOYSTICK
|
||||
values like buttons (as opposed to integer values like you might
|
||||
obtain from an analog joystick).
|
||||
|
||||
if DJOYSTICK
|
||||
if INPUT_DJOYSTICK
|
||||
|
||||
config DJOYSTICK_NPOLLWAITERS
|
||||
config INPUT_DJOYSTICK_NPOLLWAITERS
|
||||
int "Max Number of Poll Waiters"
|
||||
default 2
|
||||
|
||||
endif # DJOYSTICK
|
||||
endif # INPUT_DJOYSTICK
|
||||
|
||||
config AJOYSTICK
|
||||
bool "Analog Joystick"
|
||||
@ -541,7 +541,7 @@ if INPUT_SPQ10KBD
|
||||
|
||||
config SPQ10KBD_DJOY
|
||||
bool "Joystick Interface for Buttons"
|
||||
select DJOYSTICK
|
||||
select INPUT_DJOYSTICK
|
||||
default n
|
||||
|
||||
config SPQ10KBD_REGDBG
|
||||
|
@ -72,7 +72,7 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DJOYSTICK),y)
|
||||
ifeq ($(CONFIG_INPUT_DJOYSTICK),y)
|
||||
CSRCS += djoystick.c
|
||||
endif
|
||||
|
||||
|
@ -99,7 +99,7 @@ struct djoy_open_s
|
||||
* driver events.
|
||||
*/
|
||||
|
||||
FAR struct pollfd *do_fds[CONFIG_DJOYSTICK_NPOLLWAITERS];
|
||||
FAR struct pollfd *do_fds[CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS];
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -192,7 +192,7 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
|
||||
{
|
||||
/* Are there any poll waiters? */
|
||||
|
||||
for (i = 0; i < CONFIG_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
for (i = 0; i < CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
{
|
||||
if (opriv->do_fds[i])
|
||||
{
|
||||
@ -299,7 +299,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
|
||||
{
|
||||
/* Yes.. Notify all waiters */
|
||||
|
||||
for (i = 0; i < CONFIG_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
for (i = 0; i < CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
{
|
||||
FAR struct pollfd *fds = opriv->do_fds[i];
|
||||
if (fds)
|
||||
@ -704,7 +704,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
* slot for the poll structure reference
|
||||
*/
|
||||
|
||||
for (i = 0; i < CONFIG_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
for (i = 0; i < CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS; i++)
|
||||
{
|
||||
/* Find an available slot */
|
||||
|
||||
@ -718,7 +718,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= CONFIG_DJOYSTICK_NPOLLWAITERS)
|
||||
if (i >= CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS)
|
||||
{
|
||||
ierr("ERROR: Too man poll waiters\n");
|
||||
fds->priv = NULL;
|
||||
|
@ -51,8 +51,8 @@
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_DJOYSTICK_NPOLLWAITERS
|
||||
# define CONFIG_DJOYSTICK_NPOLLWAITERS 2
|
||||
#ifndef CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS
|
||||
# define CONFIG_INPUT_DJOYSTICK_NPOLLWAITERS 2
|
||||
#endif
|
||||
|
||||
/* Joystick Interface *******************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user