aboutsummaryrefslogtreecommitdiff
path: root/example-fsm-55/debian-logo.c
diff options
context:
space:
mode:
Diffstat (limited to 'example-fsm-55/debian-logo.c')
-rw-r--r--example-fsm-55/debian-logo.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/example-fsm-55/debian-logo.c b/example-fsm-55/debian-logo.c
index e96fb75..de7ca5c 100644
--- a/example-fsm-55/debian-logo.c
+++ b/example-fsm-55/debian-logo.c
@@ -166,14 +166,14 @@ button (void *arg)
#define PRIO_LED 3
#define PRIO_BUTTON 2
-extern uint8_t __process1_stack_base__, __process1_stack_size__;
-extern uint8_t __process2_stack_base__, __process2_stack_size__;
+extern uint8_t __process1_stack_base__[], __process1_stack_size__[];
+extern uint8_t __process2_stack_base__[], __process2_stack_size__[];
-const uint32_t __stackaddr_led = (uint32_t)&__process1_stack_base__;
-const size_t __stacksize_led = (size_t)&__process1_stack_size__;
+#define STACK_ADDR_LED ((uint32_t)__process1_stack_base__)
+#define STACK_SIZE_LED ((uint32_t)__process1_stack_size__)
-const uint32_t __stackaddr_button = (uint32_t)&__process2_stack_base__;
-const size_t __stacksize_button = (size_t)&__process2_stack_size__;
+#define STACK_ADDR_BUTTON ((uint32_t)__process2_stack_base__)
+#define STACK_SIZE_BUTTON ((uint32_t)__process2_stack_size__)
#define DATA55(x0,x1,x2,x3,x4) (x0<<20)|(x1<<15)|(x2<<10)|(x3<< 5)|(x4<< 0)
#define SIZE55(img) (sizeof (img) / sizeof (uint32_t))
@@ -382,10 +382,10 @@ main (int argc, const char *argv[])
chopstx_cond_init (&cnd0);
chopstx_cond_init (&cnd1);
- led_thd = chopstx_create (PRIO_LED, __stackaddr_led,
- __stacksize_led, led, NULL);
- button_thd = chopstx_create (PRIO_BUTTON, __stackaddr_button,
- __stacksize_button, button, NULL);
+ led_thd = chopstx_create (PRIO_LED, STACK_ADDR_LED,
+ STACK_SIZE_LED, led, NULL);
+ button_thd = chopstx_create (PRIO_BUTTON, STACK_ADDR_BUTTON,
+ STACK_SIZE_BUTTON, button, NULL);
chopstx_usec_wait (200*1000);