Update chopstx
[gnuk/neug.git] / src / main.c
index 3ccd497..ede7f25 100644 (file)
@@ -727,7 +727,7 @@ usb_main (void *arg)
 
   while (1)
     {
-      chopstx_poll (NULL, 1, &interrupt);
+      chopstx_intr_wait (&interrupt);
 
       if (interrupt.ready)
        {
@@ -1082,8 +1082,11 @@ main (int argc, char **argv)
       chopstx_mutex_unlock (&usb_mtx);
       while (1)
        {
-         chopstx_poll_cond_t poll_desc;
          uint32_t usec = 5000*1000;
+         chopstx_poll_cond_t poll_desc;
+         struct chx_poll_head *pd_array[1] = {
+           (struct chx_poll_head *)&poll_desc
+         };
 
          poll_desc.type = CHOPSTX_POLL_COND;
          poll_desc.ready = 0;
@@ -1092,7 +1095,7 @@ main (int argc, char **argv)
          poll_desc.check = check_usb_status;
          poll_desc.arg = NULL;
 
-         if (chopstx_poll (&usec, 1, &poll_desc))
+         if (chopstx_poll (&usec, 1, pd_array))
            break;
 
          /* Timeout */