acc_integration_esp32.c File Reference
#include "acc_integration.h"
#include "FreeRTOS.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

void ets_delay_us (uint32_t)
 
int64_t esp_timer_get_time (void)
 
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...
 
uint32_t acc_integration_get_time (void)
 Get current time. 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...
 

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()

void* acc_integration_mem_alloc ( size_t  size)

Allocate dynamic memory.

Parameters
[in]sizeThe bytesize of the reuested memory block
Returns
Returns either NULL or a unique pointer to a memory block

Definition at line 38 of file acc_integration_esp32.c.

◆ 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()

void acc_integration_mem_free ( void *  ptr)

Free dynamic memory.

Parameters
[in]ptrA pointer to the memory space to be freed

Definition at line 57 of file acc_integration_esp32.c.

◆ 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.

◆ esp_timer_get_time()

int64_t esp_timer_get_time ( void  )

◆ ets_delay_us()

void ets_delay_us ( uint32_t  )