Solaris Software
Loading...
Searching...
No Matches
hal.h File Reference

This file contains the structs that contain all the pointers to the functions that are used by the SPP library. The structs are used to abstract the hardware and to make the code more portable. It also contains the public functions needed to initialize all these structs. More...

Include dependency graph for hal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SPP_HALSpi_t
 SPI bus struct that contains all the pointers to the SPI functions. More...
struct  SPP_HALUart_t
 UART port struct that contains all the pointers to the UART functions. More...
struct  SPP_HALGpio_t
 GPIO struct that contains all the pointers to the GPIO functions. More...
struct  SPP_HALStorage_t
 Storage struct that contains all the pointers to the storage functions. More...
struct  SPP_HALTime_t
 Time struct that contains all the pointers to the Time functions. More...
struct  SPP_HalPort_t
 Ports struct that contains all the pointers to the Ports functions. More...

Functions

SPP_RetVal_t SPP_HAL_init (void *p_halPorts)
 This functions initializes the ports struct and initializes all the peripherals.
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. The structs are used to abstract the hardware and to make the code more portable. It also contains the public functions needed to initialize all these structs.

Detailed Description

This file contains the structs that contain all the pointers to the functions that are used by the SPP library. The structs are used to abstract the hardware and to make the code more portable. It also contains the public functions needed to initialize all these structs.

Definition in file hal.h.

Function Documentation

◆ SPP_HAL_init()

SPP_RetVal_t SPP_HAL_init ( void * p_halPorts)

This functions initializes the ports struct and initializes all the peripherals.

Definition at line 26 of file hal.c.

References K_SPP_ERROR, K_SPP_ERROR_NULL_POINTER, K_SPP_OK, s_p_halPort, SPP_HAL_init(), SPP_HAL_SPI_busInit(), and SPP_HAL_UART_portInit().

Referenced by app_main(), and SPP_HAL_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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. The structs are used to abstract the hardware and to make the code more portable. It also contains the public functions needed to initialize all these structs.

Parameters
[in]p_portsPointer to the ports struct that will be initialized.
Returns
NULL if the pointer to the ports struct is NULL.
Pointer to the ports struct, if it has beeen initialized.

Definition at line 52 of file hal.c.

References s_p_halPort, and SPP_HAL_getPort().

Referenced by SPP_HAL_getPort(), SPP_HAL_GPIO_configInterrupt(), SPP_HAL_GPIO_registerIsr(), SPP_HAL_SPI_busInit(), SPP_HAL_SPI_deviceInit(), SPP_HAL_SPI_deviceSetSpeed(), SPP_HAL_SPI_getHandle(), SPP_HAL_SPI_transmit(), SPP_HAL_STORAGE_init(), SPP_HAL_STORAGE_write(), SPP_HAL_TIME_delayMs(), SPP_HAL_TIME_getTimeMs(), SPP_HAL_TIME_getTimeUs(), SPP_HAL_UART_portInit(), SPP_HAL_UART_read(), and SPP_HAL_UART_transmit().

Here is the call graph for this function:
Here is the caller graph for this function: