Gary-Hobson commented on a change in pull request #5736: URL: https://github.com/apache/incubator-nuttx/pull/5736#discussion_r826586168
########## File path: drivers/input/touchscreen_upper.c ########## @@ -366,34 +350,40 @@ static int touch_poll(FAR struct file *filep, void touch_event(FAR void *priv, FAR const struct touch_sample_s *sample) { FAR struct touch_upperhalf_s *upper = priv; + FAR struct touch_openpriv_s *openpriv; int semcount; if (nxsem_wait(&upper->exclsem) < 0) { return; } - circbuf_overwrite(&upper->buffer, sample, - SIZEOF_TOUCH_SAMPLE_S(sample->npoints)); - touch_notify(upper, POLLIN); - nxsem_get_value(&upper->buffersem, &semcount); - if (semcount < 1) + list_for_every_entry(&upper->head, openpriv, struct touch_openpriv_s, node) { - nxsem_post(&upper->buffersem); + circbuf_overwrite(&openpriv->circbuf, sample, + SIZEOF_TOUCH_SAMPLE_S(sample->npoints)); + + nxsem_get_value(&openpriv->waitsem, &semcount); + if (semcount < 1) + { + nxsem_post(&openpriv->waitsem); + } + + touch_notify(openpriv, POLLIN); } nxsem_post(&upper->exclsem); } int touch_register(FAR struct touch_lowerhalf_s *lower, - FAR const char *path, uint8_t buff_nums) + FAR const char *path, uint8_t nums) { FAR struct touch_upperhalf_s *upper; int ret; iinfo("Registering %s\n", path); - if (lower == NULL || !buff_nums) + if (lower == NULL || !nums) Review comment: done -- 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