acc_integration.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef void(* acc_integration_uart_read_func_t) (uint8_t data, uint32_t status)
 

Functions

void acc_integration_sleep_us (uint32_t time_usec)
 Sleep for a specified number of microseconds. More...
 
void acc_integration_sleep_ms (uint32_t time_msec)
 Sleep for a specified number of milliseconds. More...
 
void * acc_integration_mem_alloc (size_t size)
 Allocate dynamic memory. More...
 
void * acc_integration_mem_calloc (size_t nmemb, size_t size)
 Allocate dynamic memory. More...
 
void acc_integration_mem_free (void *ptr)
 Free dynamic memory. More...
 
uint32_t acc_integration_get_time (void)
 Get current time. More...
 

Typedef Documentation

◆ acc_integration_uart_read_func_t

typedef void(* acc_integration_uart_read_func_t) (uint8_t data, uint32_t status)

Definition at line 12 of file acc_integration.h.

Function Documentation

◆ acc_integration_get_time()

uint32_t acc_integration_get_time ( void  )

Get current time.

It is important that this value wraps correctly and uses all bits. I.e. it should count upwards to 2^32 - 1 and then 0 again.

Returns
Current time as milliseconds

Definition at line 32 of file acc_integration_esp32.c.

◆ acc_integration_mem_alloc()

◆ acc_integration_mem_calloc()

void* acc_integration_mem_calloc ( size_t  nmemb,
size_t  size 
)

Allocate dynamic memory.

Allocate an array of nmemb elements of size bytes each.

Parameters
[in]nmembThe number of elements in the array
[in]sizeThe bytesize of the element
Returns
Returns either NULL or a unique pointer to a memory block

Definition at line 44 of file acc_integration_esp32.c.

◆ acc_integration_mem_free()

◆ acc_integration_sleep_ms()

void acc_integration_sleep_ms ( uint32_t  time_msec)

Sleep for a specified number of milliseconds.

Parameters
time_msecTime in milliseconds to sleep

Definition at line 26 of file acc_integration_esp32.c.

◆ acc_integration_sleep_us()

void acc_integration_sleep_us ( uint32_t  time_usec)

Sleep for a specified number of microseconds.

Parameters
time_usecTime in microseconds to sleep

Definition at line 20 of file acc_integration_esp32.c.