Skip to content

Commit

Permalink
Merge pull request #441 from lf-lang/rp2040-fixes
Browse files Browse the repository at this point in the history
RP2040 support based on low-level platform API
  • Loading branch information
lhstrh authored Jun 3, 2024
2 parents 7da949d + cf23e5c commit 587a8f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions low_level_platform/impl/src/lf_rp2040_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ int _lf_interruptable_sleep_until_locked(environment_t* env, instant_t wakeup_ti
sem_reset(&_lf_sem_irq_event, 0);
// create us boot wakeup time
target = from_us_since_boot((uint64_t)(wakeup_time / 1000));
// allow interrupts
LF_CRITICAL_SECTION_EXIT(env);
// Enable interrupts.
lf_critical_section_exit(env);
// blocked sleep
// return on timeout or on processor event
if (sem_acquire_block_until(&_lf_sem_irq_event, target)) {
ret_code = -1;
}
// remove interrupts
LF_CRITICAL_SECTION_ENTER(env);
// Disable interrupts.
lf_critical_section_enter(env);
return ret_code;
}

Expand Down

0 comments on commit 587a8f9

Please sign in to comment.