furi_hal_delay.h 626 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * @file furi_hal_delay.h
  3. * Delay HAL API
  4. */
  5. #pragma once
  6. #include "main.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /** Init DWT
  11. */
  12. void furi_hal_delay_init(void);
  13. /** Delay in milliseconds
  14. * @warning Cannot be used from ISR
  15. *
  16. * @param[in] milliseconds milliseconds to wait
  17. */
  18. void delay(float milliseconds);
  19. /** Delay in microseconds
  20. *
  21. * @param[in] microseconds microseconds to wait
  22. */
  23. void delay_us(float microseconds);
  24. /** Get current millisecond
  25. *
  26. * System uptime, pProvided by HAL, may overflow.
  27. *
  28. * @return Current milliseconds
  29. */
  30. uint32_t millis(void);
  31. #ifdef __cplusplus
  32. }
  33. #endif