aboutsummaryrefslogtreecommitdiff
path: root/example-cdc
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2016-06-30 16:26:52 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2016-06-30 16:26:52 +0900
commit0decd305b9b3c1fae4fb9a282bee1ab80a4e764a (patch)
treefb1d608c55cb565f58dd3076bfe5a77c343dc7e6 /example-cdc
parenta2a29146a6d7327f8e159fedb6060b77cff46021 (diff)
chopstx_poll example fix
Diffstat (limited to 'example-cdc')
-rw-r--r--example-cdc/usb-cdc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/example-cdc/usb-cdc.c b/example-cdc/usb-cdc.c
index 5614425..1a79fbf 100644
--- a/example-cdc/usb-cdc.c
+++ b/example-cdc/usb-cdc.c
@@ -699,7 +699,7 @@ tty_main (void *arg)
while (1)
{
- chopstx_poll (NULL, 1, &usb_intr);
+ chopstx_intr_wait (&usb_intr);
if (usb_intr.ready)
{
uint8_t ep_num;
@@ -928,7 +928,10 @@ tty_recv (struct tty *t, char *buf, uint32_t *timeout)
while (1)
{
- chopstx_poll (timeout, 1, &poll_desc);
+ struct chx_poll_head *pd_array[1] = {
+ (struct chx_poll_head *)&poll_desc
+ };
+ chopstx_poll (timeout, 1, pd_array);
chopstx_mutex_lock (&t->mtx);
r = check_rx (t);
chopstx_mutex_unlock (&t->mtx);