|
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "main.h"
#include "acc_definitions_common.h"
#include "acc_hal_definitions_a121.h"
#include "acc_hal_integration_a121.h"
#include "acc_integration.h"
#include "acc_integration_log.h"
Go to the source code of this file.
Macros | |
#define | SENSOR_COUNT 1 |
The number of sensors available on the board. More... | |
#define | STM32_MAX_TRANSFER_SIZE 65535 |
Size of SPI transfer buffer. More... | |
Functions | |
static void | disable_interrupts (void) |
static void | enable_interrupts (void) |
static void | acc_hal_integration_sensor_transfer16 (acc_sensor_id_t sensor_id, uint16_t *buffer, size_t buffer_length) |
void | acc_hal_integration_sensor_supply_on (acc_sensor_id_t sensor_id) |
Power on sensor supply. More... | |
void | acc_hal_integration_sensor_supply_off (acc_sensor_id_t sensor_id) |
Power off sensor supply. More... | |
void | acc_hal_integration_sensor_enable (acc_sensor_id_t sensor_id) |
Enable sensor. More... | |
void | acc_hal_integration_sensor_disable (acc_sensor_id_t sensor_id) |
Disable sensor. More... | |
bool | acc_hal_integration_wait_for_sensor_interrupt (acc_sensor_id_t sensor_id, uint32_t timeout_ms) |
Wait for a sensor interrupt. More... | |
const acc_hal_a121_t * | acc_hal_rss_integration_get_implementation (void) |
Get hal implementation reference. More... | |
uint16_t | acc_hal_integration_sensor_count (void) |
Get the max number of sensors the integration supports. More... | |
Variables | |
SPI_HandleTypeDef | A121_SPI_HANDLE |
#define SENSOR_COUNT 1 |
The number of sensors available on the board.
Definition at line 27 of file acc_hal_integration_stm32cube_xm.c.
#define STM32_MAX_TRANSFER_SIZE 65535 |
Size of SPI transfer buffer.
Definition at line 33 of file acc_hal_integration_stm32cube_xm.c.
uint16_t acc_hal_integration_sensor_count | ( | void | ) |
Get the max number of sensors the integration supports.
Definition at line 185 of file acc_hal_integration_stm32cube_xm.c.
void acc_hal_integration_sensor_disable | ( | acc_sensor_id_t | sensor_id | ) |
Disable sensor.
[in] | sensor_id | The id of the sensor to disable |
Definition at line 130 of file acc_hal_integration_stm32cube_xm.c.
void acc_hal_integration_sensor_enable | ( | acc_sensor_id_t | sensor_id | ) |
Enable sensor.
Any pending sensor interrupts should be cleared before returning from function. The sensor supply needs to be enabled by invoking acc_hal_integration_sensor_supply_on before calling this function.
[in] | sensor_id | The id of the sensor to enable |
Definition at line 119 of file acc_hal_integration_stm32cube_xm.c.
void acc_hal_integration_sensor_supply_off | ( | acc_sensor_id_t | sensor_id | ) |
Power off sensor supply.
[in] | sensor_id | The id of the sensor to power off |
Definition at line 113 of file acc_hal_integration_stm32cube_xm.c.
void acc_hal_integration_sensor_supply_on | ( | acc_sensor_id_t | sensor_id | ) |
Power on sensor supply.
[in] | sensor_id | The id of the sensor to power on |
Definition at line 107 of file acc_hal_integration_stm32cube_xm.c.
|
static |
Definition at line 68 of file acc_hal_integration_stm32cube_xm.c.
bool acc_hal_integration_wait_for_sensor_interrupt | ( | acc_sensor_id_t | sensor_id, |
uint32_t | timeout_ms | ||
) |
Wait for a sensor interrupt.
[in] | sensor_id | The sensor to wait for the interrupt on |
[in] | timeout_ms | The maximum time to wait in milliseconds |
Definition at line 142 of file acc_hal_integration_stm32cube_xm.c.
const acc_hal_a121_t* acc_hal_rss_integration_get_implementation | ( | void | ) |
Get hal implementation reference.
Definition at line 166 of file acc_hal_integration_stm32cube_xm.c.
|
inlinestatic |
Definition at line 37 of file acc_hal_integration_stm32cube_xm.c.
|
inlinestatic |
Definition at line 43 of file acc_hal_integration_stm32cube_xm.c.
SPI_HandleTypeDef A121_SPI_HANDLE |