diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-04 14:42:26 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-04 14:42:26 +0900 |
commit | 8056415dd270d9bd555302b1e04be2376591218d (patch) | |
tree | 985aeacc923daf1e3a7e7db1a71880239d880c38 /example-cdc | |
parent | ba594d5eaebe0885b09f9633b58ae55b1b03b246 (diff) |
add cleanup rouines
Diffstat (limited to 'example-cdc')
-rw-r--r-- | example-cdc/sample.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/example-cdc/sample.c b/example-cdc/sample.c index fbb7bac..0451049 100644 --- a/example-cdc/sample.c +++ b/example-cdc/sample.c @@ -116,8 +116,6 @@ static char hexchar (uint8_t x) int main (int argc, const char *argv[]) { - chopstx_t thd; - chopstx_attr_t attr; uint8_t count; (void)argc; @@ -132,21 +130,10 @@ main (int argc, const char *argv[]) m = 10; - chopstx_attr_init (&attr); - chopstx_attr_setschedparam (&attr, PRIO_PWM); - chopstx_attr_setstack (&attr, __stackaddr_pwm, __stacksize_pwm); - - chopstx_create (&thd, &attr, pwm, NULL); - - chopstx_attr_setschedparam (&attr, PRIO_BLK); - chopstx_attr_setstack (&attr, __stackaddr_blk, __stacksize_blk); - - chopstx_create (&thd, &attr, blk, NULL); - - chopstx_attr_setschedparam (&attr, PRIO_INTR); - chopstx_attr_setstack (&attr, __stackaddr_intr, __stacksize_intr); - - chopstx_create (&thd, &attr, usb_intr, NULL); + chopstx_create (PRIO_PWM, __stackaddr_pwm, __stacksize_pwm, pwm, NULL); + chopstx_create (PRIO_BLK, __stackaddr_blk, __stacksize_blk, blk, NULL); + chopstx_create (PRIO_INTR, __stackaddr_intr, __stacksize_intr, + usb_intr, NULL); chopstx_usec_wait (200*1000); |