Solaris Software
Toggle main menu visibility
Loading...
Searching...
No Matches
timePort.c
Go to the documentation of this file.
1
/**
2
* @file timePort.c
3
* @brief ESP32-S3 time port implementation.
4
*/
5
6
/* ----------------------------------------------------------------
7
* INCLUDES
8
* ---------------------------------------------------------------- */
9
#include "
timePort.h
"
10
11
#include "esp_timer.h"
12
13
/* ----------------------------------------------------------------
14
* PUBLIC FUNCTIONS
15
* ---------------------------------------------------------------- */
16
17
spp_uint32_t
SPP_PORTS_HAL_ESP32_getTimeMs
(
void
)
18
{
19
return
(
spp_uint32_t
)(esp_timer_get_time() / 1000LL);
20
}
21
22
spp_uint32_t
SPP_PORTS_HAL_ESP32_getTimeUs
(
void
)
23
{
24
return
(
spp_uint32_t
)(esp_timer_get_time());
25
}
26
27
void
SPP_PORTS_HAL_ESP32_delayMs
(
spp_uint32_t
ms)
28
{
29
spp_uint32_t
start =
SPP_PORTS_HAL_ESP32_getTimeMs
();
30
while
((
SPP_PORTS_HAL_ESP32_getTimeMs
() - start) < ms)
31
{
/* busy-wait */
32
}
33
}
SPP_PORTS_HAL_ESP32_getTimeUs
spp_uint32_t SPP_PORTS_HAL_ESP32_getTimeUs(void)
Definition
timePort.c:22
SPP_PORTS_HAL_ESP32_getTimeMs
spp_uint32_t SPP_PORTS_HAL_ESP32_getTimeMs(void)
Definition
timePort.c:17
SPP_PORTS_HAL_ESP32_delayMs
void SPP_PORTS_HAL_ESP32_delayMs(spp_uint32_t ms)
Definition
timePort.c:27
timePort.h
ESP32-S3 time port implementation.
spp_uint32_t
uint32_t spp_uint32_t
Definition
types.h:31
solaris-v2
spp
ports
hal
esp32
time
timePort.c
Generated by
1.18.0