diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 10:27:22 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 10:27:22 +0900 |
commit | 699344840b7bebfeedccdda79a1144fc576b7ceb (patch) | |
tree | 1962ec3e70eb59ae288ba6a39341c1b6d3e331a4 /example-cdc | |
parent | 6d568f91847ef8a35036cff25e1e8987c1b23763 (diff) |
Implement cancellation. Rename, etc.
Diffstat (limited to 'example-cdc')
-rw-r--r-- | example-cdc/sample.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/example-cdc/sample.c b/example-cdc/sample.c index 80b5ef5..3cc87dc 100644 --- a/example-cdc/sample.c +++ b/example-cdc/sample.c @@ -27,9 +27,9 @@ pwm (void *arg) while (1) { set_led (u&v); - chopstx_usleep (m); + chopstx_usec_wait (m); set_led (0); - chopstx_usleep (100-m); + chopstx_usec_wait (100-m); } return NULL; @@ -47,9 +47,9 @@ blk (void *arg) while (1) { v = 0; - chopstx_usleep (200*1000); + chopstx_usec_wait (200*1000); v = 1; - chopstx_usleep (200*1000); + chopstx_usec_wait (200*1000); } return NULL; @@ -75,7 +75,7 @@ usb_intr (void *arg) while (1) { - chopstx_wait_intr (&interrupt); + chopstx_intr_wait (&interrupt); /* Process interrupt. */ usb_interrupt_handler (); @@ -138,7 +138,7 @@ main (int argc, const char *argv[]) chopstx_create (&thd, &attr, usb_intr, NULL); - chopstx_usleep (200*1000); + chopstx_usec_wait (200*1000); chopstx_mutex_lock (&mtx); chopstx_cond_signal (&cnd0); @@ -158,7 +158,7 @@ main (int argc, const char *argv[]) while (1) { u ^= 1; - chopstx_usleep (200*1000*6); + chopstx_usec_wait (200*1000*6); usb_lld_write (ENDP1, "Hello, World with Chopstx!\r\n", 28); chopstx_mutex_lock (&usb_mtx); |