|
#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_set_periodic_wakeup (uint32_t time_msec) |
Set up a periodic timer used to wake up the system from sleep. More... | |
void | acc_integration_sleep_until_periodic_wakeup (void) |
Put the system in sleep until the periodic timer triggers. 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... | |
void | acc_integration_critical_section_enter (void) |
void | acc_integration_critical_section_exit (void) |
uint32_t | acc_integration_get_time (void) |
Get current time. More... | |
typedef void(* acc_integration_uart_read_func_t) (uint8_t data, uint32_t status) |
Definition at line 12 of file acc_integration.h.
void acc_integration_critical_section_enter | ( | void | ) |
Enter a critical section
Definition at line 10 of file acc_integration_cortex.c.
void acc_integration_critical_section_exit | ( | void | ) |
Exit a critical section
Definition at line 18 of file acc_integration_cortex.c.
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.
Definition at line 626 of file acc_integration_stm32.c.
void* acc_integration_mem_alloc | ( | size_t | size | ) |
Allocate dynamic memory.
[in] | size | The bytesize of the reuested memory block |
Definition at line 632 of file acc_integration_stm32.c.
void* acc_integration_mem_calloc | ( | size_t | nmemb, |
size_t | size | ||
) |
Allocate dynamic memory.
Allocate an array of nmemb elements of size bytes each.
[in] | nmemb | The number of elements in the array |
[in] | size | The bytesize of the element |
Definition at line 638 of file acc_integration_stm32.c.
void acc_integration_mem_free | ( | void * | ptr | ) |
Free dynamic memory.
[in] | ptr | A pointer to the memory space to be freed |
Definition at line 644 of file acc_integration_stm32.c.
void acc_integration_set_periodic_wakeup | ( | uint32_t | time_msec | ) |
Set up a periodic timer used to wake up the system from sleep.
This function will start a periodic timer with the specified time. This is useful when the drift of the wakeup interval should be kept at a minimum.
If the time_msec is set to zero the periodic wakeup will be disabled.
time_msec | Time in milliseconds |
Definition at line 531 of file acc_integration_stm32.c.
void acc_integration_sleep_ms | ( | uint32_t | time_msec | ) |
Sleep for a specified number of milliseconds.
time_msec | Time in milliseconds to sleep |
Definition at line 501 of file acc_integration_stm32.c.
void acc_integration_sleep_until_periodic_wakeup | ( | void | ) |
Put the system in sleep until the periodic timer triggers.
The periodic timer must be started using acc_integration_set_periodic_wakeup prior to invoking this function. The target specific implementation of this function will determine the sleep depth based on the set sleep interval and it will be a trade-off between wake-up latency and power consumption.
Definition at line 590 of file acc_integration_stm32.c.
void acc_integration_sleep_us | ( | uint32_t | time_usec | ) |
Sleep for a specified number of microseconds.
time_usec | Time in microseconds to sleep |
Definition at line 507 of file acc_integration_stm32.c.