mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
driver/uinput: add uinput button support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -148,6 +148,11 @@ struct btn_lowerhalf_s
|
||||
CODE void (*bl_enable)(FAR const struct btn_lowerhalf_s *lower,
|
||||
btn_buttonset_t press, btn_buttonset_t release,
|
||||
btn_handler_t handler, FAR void *arg);
|
||||
|
||||
/* Key write callback function */
|
||||
|
||||
CODE ssize_t (*bl_write)(FAR const struct btn_lowerhalf_s *lower,
|
||||
FAR const char *buffer, size_t buflen);
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -49,4 +49,21 @@
|
||||
int uinput_touch_initialize(FAR const char *name, int maxpoint,
|
||||
int buffnums);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uinput_button_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialized the uinput button device
|
||||
*
|
||||
* Input Parameters:
|
||||
* name: Button devices name
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero is returned on success. Otherwise, a negated errno value is
|
||||
* returned to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int uinput_button_initialize(FAR const char *name);
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_INPUT_UINPUT_H */
|
||||
|
||||
Reference in New Issue
Block a user