diff options
Diffstat (limited to 'firmware/target/arm/olympus')
-rw-r--r-- | firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c index 036b6ae71c..d1e1c82c95 100644 --- a/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c +++ b/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c | |||
@@ -67,7 +67,7 @@ unsigned char rc_buf[5]; | |||
67 | /* Remote thread functions */ | 67 | /* Remote thread functions */ |
68 | /* These functions are private to the remote thread */ | 68 | /* These functions are private to the remote thread */ |
69 | /* ================================================== */ | 69 | /* ================================================== */ |
70 | static struct wakeup rc_thread_wakeup; | 70 | static struct semaphore rc_thread_wakeup; |
71 | static unsigned int remote_thread_id; | 71 | static unsigned int remote_thread_id; |
72 | static int remote_stack[256/sizeof(int)]; | 72 | static int remote_stack[256/sizeof(int)]; |
73 | static const char * const remote_thread_name = "remote"; | 73 | static const char * const remote_thread_name = "remote"; |
@@ -368,7 +368,7 @@ static void remote_thread(void) | |||
368 | 368 | ||
369 | while (1) | 369 | while (1) |
370 | { | 370 | { |
371 | wakeup_wait(&rc_thread_wakeup, rc_thread_wait_timeout); | 371 | semaphore_wait(&rc_thread_wakeup, rc_thread_wait_timeout); |
372 | 372 | ||
373 | /* Error handling (most likely due to remote not present) */ | 373 | /* Error handling (most likely due to remote not present) */ |
374 | if (rc_status & RC_ERROR_MASK) | 374 | if (rc_status & RC_ERROR_MASK) |
@@ -500,7 +500,7 @@ void lcd_remote_off(void) | |||
500 | { | 500 | { |
501 | /* should only be used to power off at shutdown */ | 501 | /* should only be used to power off at shutdown */ |
502 | rc_status |= RC_POWER_OFF; | 502 | rc_status |= RC_POWER_OFF; |
503 | wakeup_signal(&rc_thread_wakeup); | 503 | semaphore_release(&rc_thread_wakeup); |
504 | 504 | ||
505 | /* wait until the things are powered off */ | 505 | /* wait until the things are powered off */ |
506 | while (rc_status & RC_DEV_INIT) | 506 | while (rc_status & RC_DEV_INIT) |
@@ -515,7 +515,7 @@ void lcd_remote_on(void) | |||
515 | { | 515 | { |
516 | rc_status &= ~RC_FORCE_DETECT; | 516 | rc_status &= ~RC_FORCE_DETECT; |
517 | rc_status &= ~RC_POWER_OFF; | 517 | rc_status &= ~RC_POWER_OFF; |
518 | wakeup_signal(&rc_thread_wakeup); | 518 | semaphore_release(&rc_thread_wakeup); |
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
@@ -536,7 +536,7 @@ void lcd_remote_init_device(void) | |||
536 | GPIO_SET_BITWISE(GPIOL_OUTPUT_EN, 0x80); | 536 | GPIO_SET_BITWISE(GPIOL_OUTPUT_EN, 0x80); |
537 | 537 | ||
538 | /* a thread is required to poll & update the remote */ | 538 | /* a thread is required to poll & update the remote */ |
539 | wakeup_init(&rc_thread_wakeup); | 539 | semaphore_init(&rc_thread_wakeup, 1, 0); |
540 | remote_thread_id = create_thread(remote_thread, remote_stack, | 540 | remote_thread_id = create_thread(remote_thread, remote_stack, |
541 | sizeof(remote_stack), 0, remote_thread_name | 541 | sizeof(remote_stack), 0, remote_thread_name |
542 | IF_PRIO(, PRIORITY_SYSTEM) | 542 | IF_PRIO(, PRIORITY_SYSTEM) |