aboutsummaryrefslogtreecommitdiff
path: root/example-led
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2013-05-24 09:37:06 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2013-05-24 09:37:06 +0900
commit6209b54ffd3abba848d1ef663a16b0590b1c70cb (patch)
treef9b6839c781ee38d576ecece5d521de0dc951fb2 /example-led
parentd0f07a3e109baf619cf654bd2f2d79c74c14a277 (diff)
no sys.h required
Diffstat (limited to 'example-led')
-rw-r--r--example-led/sample.c32
-rw-r--r--example-led/sys.h2
2 files changed, 0 insertions, 34 deletions
diff --git a/example-led/sample.c b/example-led/sample.c
index 9441a57..c4ca7bf 100644
--- a/example-led/sample.c
+++ b/example-led/sample.c
@@ -6,7 +6,6 @@
static chopstx_mutex_t mtx;
static chopstx_cond_t cnd0;
static chopstx_cond_t cnd1;
-static chopstx_cond_t cnd_intr;
static uint8_t u, v;
static uint8_t m; /* 0..100 */
@@ -51,34 +50,11 @@ blk (void *arg)
return NULL;
}
-#define INTR_REQ_0 0
-
-static void *
-intr (void *arg)
-{
- (void)arg;
- chopstix_intr_t interrupt;
-
- chopstx_intr_register (&interrupt, INTR_REQ_0);
-
- while (1)
- {
- chopstx_wait_intr (&interrupt);
-
- /* process interrupt... */
- chopstx_usleep (200*1000);
- }
-
- return NULL;
-}
-
#define PRIO_PWM 3
#define PRIO_BLK 2
-#define PRIO_INTR 2
extern uint8_t __process1_stack_base__, __process1_stack_size__;
extern uint8_t __process2_stack_base__, __process2_stack_size__;
-extern uint8_t __process3_stack_base__, __process3_stack_size__;
const uint32_t __stackaddr_pwm = (uint32_t)&__process1_stack_base__;
const size_t __stacksize_pwm = (size_t)&__process1_stack_size__;
@@ -86,9 +62,6 @@ const size_t __stacksize_pwm = (size_t)&__process1_stack_size__;
const uint32_t __stackaddr_blk = (uint32_t)&__process2_stack_base__;
const size_t __stacksize_blk = (size_t)&__process2_stack_size__;
-const uint32_t __stackaddr_intr = (uint32_t)&__process3_stack_base__;
-const size_t __stacksize_intr = (size_t)&__process3_stack_size__;
-
int
main (int argc, const char *argv[])
@@ -116,11 +89,6 @@ main (int argc, const char *argv[])
chopstx_create (&thd, &attr, blk, NULL);
- chopstx_attr_setschedparam (&attr, PRIO_INTR);
- chopstx_attr_setstack (&attr, __stackaddr_intr, __stacksize_intr);
-
- chopstx_create (&thd, &attr, intr, NULL);
-
chopstx_usleep (200*1000);
chopstx_mutex_lock (&mtx);
diff --git a/example-led/sys.h b/example-led/sys.h
index bb1ea71..1f5b602 100644
--- a/example-led/sys.h
+++ b/example-led/sys.h
@@ -20,13 +20,11 @@ set_led (int on)
return (*func) (on);
}
-#if 0
static inline void
flash_unlock (void)
{
(*vector[3]) ();
}
-#endif
static inline int
flash_program_halfword (uint32_t addr, uint16_t data)