Skip to content

Commit

Permalink
Add early interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Dec 7, 2022
1 parent b4e4303 commit c8f1417
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lwow/src/system/lwow_ll_stm32_single_gpio_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ prv_exch(uint16_t low_init_pulse_time, uint16_t pre_sample_time, uint16_t post_s
/* Read pin state */
b = LL_GPIO_IsInputPinSet(GPIO_PORT, GPIO_PIN);

/* Interrupts can now be enabled from this point */
IRQ_UNLOCK;

/* Wait remaining time */
start_time = time;
while ((uint16_t)((time = timebase_get_us_tick()) - start_time) < post_sample_time) {}

IRQ_UNLOCK;

return b;
}

Expand Down

0 comments on commit c8f1417

Please sign in to comment.