mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
board/sim: update uinput init & Kconfig
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
0c2f86f74d
commit
eebd736891
+17
-2
@@ -36,12 +36,27 @@ config INPUT_TOUCHSCREEN
|
||||
default n
|
||||
|
||||
config INPUT_UINPUT
|
||||
bool "Enable uinput"
|
||||
select INPUT_TOUCHSCREEN
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
Enable support virtual input device driver
|
||||
|
||||
config UINPUT_TOUCHSCREEN
|
||||
bool "Enable uinput touchscreen"
|
||||
select INPUT_TOUCHSCREEN
|
||||
select INPUT_UINPUT
|
||||
default n
|
||||
---help---
|
||||
Enable support virtual input touchscreen device driver
|
||||
|
||||
config UINPUT_BUTTONS
|
||||
bool "Enable uinput buttons"
|
||||
select INPUT_BUTTONS
|
||||
select INPUT_UINPUT
|
||||
default n
|
||||
---help---
|
||||
Enable support virtual input button device driver
|
||||
|
||||
config INPUT_MAX11802
|
||||
bool "MAX11802 touchscreen controller"
|
||||
default n
|
||||
|
||||
+20
-15
@@ -51,12 +51,15 @@ struct uinput_button_lowerhalf_s
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_INPUT_TOUCHSCREEN
|
||||
#ifdef CONFIG_UINPUT_TOUCHSCREEN
|
||||
|
||||
static ssize_t uinput_touch_write(FAR struct touch_lowerhalf_s *lower,
|
||||
FAR const char *buffer, size_t buflen);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INPUT_BUTTONS
|
||||
#endif /* CONFIG_UINPUT_TOUCHSCREEN */
|
||||
|
||||
#ifdef CONFIG_UINPUT_BUTTONS
|
||||
|
||||
static ssize_t uinput_button_write(FAR const struct btn_lowerhalf_s *lower,
|
||||
FAR const char *buffer, size_t buflen);
|
||||
|
||||
@@ -71,13 +74,14 @@ static void uinput_button_enable(FAR const struct btn_lowerhalf_s *lower,
|
||||
btn_buttonset_t release,
|
||||
btn_handler_t handler,
|
||||
FAR void *arg);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_UINPUT_BUTTONS */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_INPUT_TOUCHSCREEN
|
||||
#ifdef CONFIG_UINPUT_TOUCHSCREEN
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uinput_touch_write
|
||||
@@ -97,13 +101,10 @@ static ssize_t uinput_touch_write(FAR struct touch_lowerhalf_s *lower,
|
||||
touch_event(lower->priv, sample);
|
||||
return buflen;
|
||||
}
|
||||
#endif /* CONFIG_INPUT_TOUCHSCREEN */
|
||||
|
||||
#ifdef CONFIG_INPUT_BUTTONS
|
||||
#endif /* CONFIG_UINPUT_TOUCHSCREEN */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uinput_button_write
|
||||
****************************************************************************/
|
||||
#ifdef CONFIG_UINPUT_BUTTONS
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uinput_button_write
|
||||
@@ -165,7 +166,7 @@ static void uinput_button_enable(FAR const struct btn_lowerhalf_s *lower,
|
||||
ubtn_lower->handler = handler;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INPUT_BUTTONS */
|
||||
#endif /* CONFIG_UINPUT_BUTTONS */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
@@ -188,7 +189,8 @@ static void uinput_button_enable(FAR const struct btn_lowerhalf_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_INPUT_TOUCHSCREEN
|
||||
#ifdef CONFIG_UINPUT_TOUCHSCREEN
|
||||
|
||||
int uinput_touch_initialize(FAR const char *name, int maxpoint, int buffnums)
|
||||
{
|
||||
char devname[UINPUT_NAME_SIZE];
|
||||
@@ -215,7 +217,8 @@ int uinput_touch_initialize(FAR const char *name, int maxpoint, int buffnums)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_UINPUT_TOUCHSCREEN */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uinput_button_initialize
|
||||
@@ -232,7 +235,8 @@ int uinput_touch_initialize(FAR const char *name, int maxpoint, int buffnums)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_INPUT_BUTTONS
|
||||
#ifdef CONFIG_UINPUT_BUTTONS
|
||||
|
||||
int uinput_button_initialize(FAR const char *name)
|
||||
{
|
||||
char devname[UINPUT_NAME_SIZE];
|
||||
@@ -254,4 +258,5 @@ int uinput_button_initialize(FAR const char *name)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_INPUT_BUTTONS */
|
||||
|
||||
#endif /* CONFIG_UINPUT_BUTTONS */
|
||||
|
||||
Reference in New Issue
Block a user