Gary-Hobson commented on a change in pull request #5736: URL: https://github.com/apache/incubator-nuttx/pull/5736#discussion_r826601758
########## File path: drivers/input/uinput.c ########## @@ -73,30 +154,173 @@ static void uinput_button_enable(FAR const struct btn_lowerhalf_s *lower, FAR void *arg); #endif +#endif /* CONFIG_UINPUT_BUTTONS */ + +#ifdef CONFIG_UINPUT_KEYBOARD + +static ssize_t uinput_keyboard_notify(FAR struct uinput_context_s *ctx, + FAR const char *buffer, size_t buflen); + +static ssize_t uinput_keyboard_write(FAR struct keyboard_lowerhalf_s *lower, + FAR const char *buffer, size_t buflen); + +#endif /* CONFIG_UINPUT_KEYBOARD */ + /**************************************************************************** * Private Functions ****************************************************************************/ -#ifdef CONFIG_INPUT_TOUCHSCREEN +#ifdef CONFIG_UINPUT_RPMSG /**************************************************************************** - * Name: uinput_touch_write + * uinput_rpmsg_ept_cb ****************************************************************************/ -static ssize_t uinput_touch_write(FAR struct touch_lowerhalf_s *lower, - FAR const char *buffer, size_t buflen) +static int uinput_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept, + FAR void *data, size_t len, + uint32_t src, FAR void *priv) +{ + FAR struct uinput_context_s *ctx = priv; + + ctx->notify(ctx, data, len); + return 0; +} + +/**************************************************************************** + * uinput_rpmsg_device_created + ****************************************************************************/ + +static void uinput_rpmsg_device_created(FAR struct rpmsg_device *rdev, + FAR void *priv) { - FAR const struct touch_sample_s *sample; + int ret; + char rpmsg_ept_name[RPMSG_NAME_SIZE]; + FAR struct uinput_rpmsg_ept_s *ept; + FAR struct uinput_context_s *ctx = (FAR struct uinput_context_s *)priv; + FAR struct list_node *list = &ctx->eptlist; + + ept = kmm_zalloc(sizeof(struct uinput_rpmsg_ept_s)); + if (!ept) Review comment: Does this also need to be changed to if (ept= = null)? Or when is explicit expansion necessary? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org