acc_hal_definitions_a121.h File Reference
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "acc_definitions_common.h"

Go to the source code of this file.

Data Structures

struct  acc_hal_optimization_t
 This struct contains function pointers that are optional to support different optimizations. More...
 
struct  acc_hal_a121_t
 

Macros

#define ACC_HAL_SPI_TRANSFER_SIZE_REQUIRED   16U
 Specifies the minimal size in bytes that SPI transfers must be able to handle. More...
 

Typedefs

typedef void *(* acc_hal_mem_alloc_function_t) (size_t)
 Definition of a memory allocation function. More...
 
typedef void(* acc_hal_mem_free_function_t) (void *)
 Definition of a memory free function. More...
 
typedef void(* acc_hal_sensor_transfer8_function_t) (acc_sensor_id_t sensor_id, uint8_t *buffer, size_t buffer_size)
 Definition of a sensor transfer function. More...
 
typedef void(* acc_hal_sensor_transfer16_function_t) (acc_sensor_id_t sensor_id, uint16_t *buffer, size_t buffer_length)
 Definition of an optimized 16-bit sensor transfer function. More...
 
typedef void(* acc_hal_log_function_t) (acc_log_level_t level, const char *module, const char *format,...)
 Definition of a log function. More...
 

Macro Definition Documentation

◆ ACC_HAL_SPI_TRANSFER_SIZE_REQUIRED

#define ACC_HAL_SPI_TRANSFER_SIZE_REQUIRED   16U

Specifies the minimal size in bytes that SPI transfers must be able to handle.

Definition at line 18 of file acc_hal_definitions_a121.h.

Typedef Documentation

◆ acc_hal_log_function_t

typedef void(* acc_hal_log_function_t) (acc_log_level_t level, const char *module, const char *format,...)

Definition of a log function.

Definition at line 80 of file acc_hal_definitions_a121.h.

◆ acc_hal_mem_alloc_function_t

typedef void*(* acc_hal_mem_alloc_function_t) (size_t)

Definition of a memory allocation function.

Allocated memory should be suitably aligned for any built-in type. Returning NULL is seen as failure.

Definition at line 25 of file acc_hal_definitions_a121.h.

◆ acc_hal_mem_free_function_t

typedef void(* acc_hal_mem_free_function_t) (void *)

Definition of a memory free function.

Free memory which is previously allocated.

Definition at line 33 of file acc_hal_definitions_a121.h.

◆ acc_hal_sensor_transfer16_function_t

typedef void(* acc_hal_sensor_transfer16_function_t) (acc_sensor_id_t sensor_id, uint16_t *buffer, size_t buffer_length)

Definition of an optimized 16-bit sensor transfer function.

This function shall transfer data to and from the sensor over spi with 16 bits data size. It's beneficial from a performance perspective to use dma if available. The buffer is naturally aligned to a minimum of 4 bytes.

If defined it will supersede the normal 8-bit function acc_hal_sensor_transfer8_function_t

Definition at line 57 of file acc_hal_definitions_a121.h.

◆ acc_hal_sensor_transfer8_function_t

typedef void(* acc_hal_sensor_transfer8_function_t) (acc_sensor_id_t sensor_id, uint8_t *buffer, size_t buffer_size)

Definition of a sensor transfer function.

This function shall transfer data to and from the sensor over spi. It's beneficial from a performance perspective to use dma if available. The buffer is naturally aligned to a maximum of 4 bytes.

Definition at line 44 of file acc_hal_definitions_a121.h.