systimer.h 573 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief Convert ticks to microseconds
  13. *
  14. * @param ticks ticks to convert
  15. * @return microseconds
  16. */
  17. uint64_t systimer_ticks_to_us(uint64_t ticks) __attribute__((const));
  18. /**
  19. * @brief Convert microseconds to ticks
  20. *
  21. * @param us microseconds to convert
  22. * @return ticks
  23. */
  24. uint64_t systimer_us_to_ticks(uint64_t us) __attribute__((const));
  25. #ifdef __cplusplus
  26. }
  27. #endif