Solaris Software
Toggle main menu visibility
Loading...
Searching...
No Matches
time.c
Go to the documentation of this file.
1
/**
2
* @file spi.c
3
* @brief HAL SPI functions implementation. Calls the function pointer and returns the result.
4
*/
5
6
7
/* ----------------------------------------------------------------
8
* INCLUDES
9
* ---------------------------------------------------------------- */
10
#include "
spp/hal/hal.h
"
11
#include "
spp/hal/time/time.h
"
12
13
14
/* ----------------------------------------------------------------
15
* PUBLIC FUNCTIONS
16
* ---------------------------------------------------------------- */
17
spp_uint32_t
SPP_HAL_TIME_getTimeMs
(
void
)
18
{
19
const
SPP_HalPort_t
*p_port =
SPP_HAL_getPort
();
20
if
((p_port == NULL) || (p_port->
time
.
getTimeMs
== NULL))
21
{
22
return
0U;
23
}
24
return
p_port->
time
.
getTimeMs
();
25
}
26
27
spp_uint32_t
SPP_HAL_TIME_getTimeUs
(
void
)
28
{
29
const
SPP_HalPort_t
*p_port =
SPP_HAL_getPort
();
30
if
((p_port == NULL) || (p_port->
time
.
getTimeUs
== NULL))
31
{
32
return
0U;
33
}
34
return
p_port->
time
.
getTimeUs
();
35
}
36
37
void
SPP_HAL_TIME_delayMs
(
spp_uint32_t
ms)
38
{
39
const
SPP_HalPort_t
*p_port =
SPP_HAL_getPort
();
40
if
((p_port != NULL) && (p_port->
time
.
delayMs
!= NULL))
41
{
42
p_port->
time
.
delayMs
(ms);
43
}
44
}
SPP_HAL_getPort
const SPP_HalPort_t * SPP_HAL_getPort(void)
This function is used to get the pointers to the functions that are used by the SPP library....
Definition
hal.c:52
hal.h
This file contains the structs that contain all the pointers to the functions that are used by the SP...
SPP_HALTime_t::getTimeUs
spp_uint32_t(*) getTimeUs(void)
Return the current hardware time in microseconds.
Definition
hal.h:197
SPP_HALTime_t::getTimeMs
spp_uint32_t(*) getTimeMs(void)
Return the current hardware time in milliseconds.
Definition
hal.h:188
SPP_HALTime_t::delayMs
void(*) delayMs(spp_uint32_t ms)
Block for the requested number of milliseconds.
Definition
hal.h:207
SPP_HalPort_t
Ports struct that contains all the pointers to the Ports functions.
Definition
hal.h:215
SPP_HalPort_t::time
SPP_HALTime_t time
Definition
hal.h:219
SPP_HAL_TIME_getTimeMs
spp_uint32_t SPP_HAL_TIME_getTimeMs(void)
Return the current hardware time in milliseconds.
Definition
time.c:17
SPP_HAL_TIME_getTimeUs
spp_uint32_t SPP_HAL_TIME_getTimeUs(void)
Return the current hardware time in microseconds.
Definition
time.c:27
SPP_HAL_TIME_delayMs
void SPP_HAL_TIME_delayMs(spp_uint32_t ms)
Block for the requested number of milliseconds.
Definition
time.c:37
time.h
SPP HAL time API — dispatches through the registered HAL port.
spp_uint32_t
uint32_t spp_uint32_t
Definition
types.h:31
solaris-v2
spp
hal
time
time.c
Generated by
1.18.0