acc_hal_integration_a121.h
Go to the documentation of this file.
1 // Copyright (c) Acconeer AB, 2021-2022
2 // All rights reserved
3 
4 #ifndef ACC_HAL_INTEGRATION_A121_H_
5 #define ACC_HAL_INTEGRATION_A121_H_
6 
7 #include <stdbool.h>
8 #include <stdint.h>
9 
10 #include "acc_definitions_common.h"
12 
13 
14 /**
15  * @brief Get hal implementation reference
16  */
18 
19 
20 /**
21  * @brief Power on sensor supply
22  *
23  * @param[in] sensor_id The id of the sensor to power on
24  */
26 
27 
28 /**
29  * @brief Power off sensor supply
30  *
31  * @param[in] sensor_id The id of the sensor to power off
32  */
34 
35 
36 /**
37  * @brief Enable sensor
38  *
39  * Any pending sensor interrupts should be cleared before returning from function.
40  * The sensor supply needs to be enabled by invoking @ref acc_hal_integration_sensor_supply_on
41  * before calling this function.
42  *
43  * @param[in] sensor_id The id of the sensor to enable
44  */
46 
47 
48 /**
49  * @brief Disable sensor
50  *
51  * @param[in] sensor_id The id of the sensor to disable
52  */
54 
55 
56 /**
57  * @brief Wait for a sensor interrupt
58  *
59  * @param[in] sensor_id The sensor to wait for the interrupt on
60  * @param[in] timeout_ms The maximum time to wait in milliseconds
61  * @return True if an interrupt has occurred within timeout, false if timeout occurred
62  */
63 bool acc_hal_integration_wait_for_sensor_interrupt(acc_sensor_id_t sensor_id, uint32_t timeout_ms);
64 
65 
66 /**
67  * @brief Get the max number of sensors the integration supports
68  *
69  * @return The max sensor count
70  */
72 
73 
74 #endif
acc_hal_integration_sensor_supply_off
void acc_hal_integration_sensor_supply_off(acc_sensor_id_t sensor_id)
Power off sensor supply.
Definition: acc_hal_integration_espidf_xe121.c:192
acc_hal_integration_sensor_supply_on
void acc_hal_integration_sensor_supply_on(acc_sensor_id_t sensor_id)
Power on sensor supply.
Definition: acc_hal_integration_espidf_xe121.c:185
acc_hal_rss_integration_get_implementation
const acc_hal_a121_t * acc_hal_rss_integration_get_implementation(void)
Get hal implementation reference.
Definition: acc_hal_integration_espidf_xe121.c:135
acc_hal_a121_t
Definition: acc_hal_definitions_a121.h:82
acc_hal_integration_wait_for_sensor_interrupt
bool acc_hal_integration_wait_for_sensor_interrupt(acc_sensor_id_t sensor_id, uint32_t timeout_ms)
Wait for a sensor interrupt.
Definition: acc_hal_integration_espidf_xe121.c:100
acc_hal_integration_sensor_enable
void acc_hal_integration_sensor_enable(acc_sensor_id_t sensor_id)
Enable sensor.
Definition: acc_hal_integration_espidf_xe121.c:199
acc_hal_definitions_a121.h
acc_hal_integration_sensor_disable
void acc_hal_integration_sensor_disable(acc_sensor_id_t sensor_id)
Disable sensor.
Definition: acc_hal_integration_espidf_xe121.c:214
acc_sensor_id_t
uint32_t acc_sensor_id_t
Type representing a sensor ID.
Definition: acc_definitions_common.h:14
acc_hal_integration_sensor_count
uint16_t acc_hal_integration_sensor_count(void)
Get the max number of sensors the integration supports.
Definition: acc_hal_integration_espidf_xe121.c:224
acc_definitions_common.h