i2c_example_cargo.h
Go to the documentation of this file.
1 // Copyright (c) Acconeer AB, 2025
2 // All rights reserved
3
4 #ifndef I2C_EXAMPLE_CARGO_H_
5 #define I2C_EXAMPLE_CARGO_H_
6
7 #include <stdbool.h>
8 #include <stdint.h>
9
10 #include "example_cargo.h"
11
12 /**
13 * @brief Get pointer to internal cargo config struct
14 *
15 * @return cargo configuration handle
16 */
17 cargo_config_t *i2c_example_cargo_get_config(void);
18
19 /**
20 * @brief Send command to be executed to cargo i2c app
21 *
22 * @param[in] command The command to be executed
23 * @return true if successful
24 */
25 bool i2c_example_cargo_command(uint32_t command);
26
27 /**
28 * @brief Get cargo example app status
29 *
30 * @return status from cargo example app
31 */
32 uint32_t i2c_example_cargo_get_status(void);
33
34 /**
35 * @brief Get the count of number of measurements performed
36 *
37 * The counter will be increased every time the Cargo example app completes a measurement
38 *
39 * @return measure counter from application
40 */
41 uint32_t i2c_example_cargo_get_measure_counter(void);
42
43 /**
44 * @brief Get the estimated presence update rate of the
45 *
46 * The application measures time between presence updates with ms accuraccy.
47 *
48 * @return The estimated update rate in mHz
49 */
50 uint32_t i2c_example_cargo_get_actual_presence_update_rate(void);
51
52 /**
53 * @brief Copy utilization example app cargo result
54 *
55 * @return result from example app cargo
56 */
57 void i2c_example_cargo_copy_utilization_result_fields(cargo_result_t *dst_result);
58
59 /**
60 * @brief Copy presence example app cargo result
61 *
62 * @return result from example app cargo
63 */
64 void i2c_example_cargo_copy_presence_burst_result_fields(cargo_result_t *dst_result);
65
66 /**
67 * @brief Get most recently measured temperature
68 *
69 * @return temperature as defined in @ref acc_processing_result_t
70 */
71 int16_t i2c_example_cargo_get_temperature(void);
72
73 #endif
i2c_example_cargo_get_status
uint32_t i2c_example_cargo_get_status(void)
Get cargo example app status.
Definition: i2c_example_cargo.c:241
i2c_example_cargo_get_actual_presence_update_rate
uint32_t i2c_example_cargo_get_actual_presence_update_rate(void)
Get the estimated presence update rate of the.
Definition: i2c_example_cargo.c:264
i2c_example_cargo_copy_utilization_result_fields
void i2c_example_cargo_copy_utilization_result_fields(cargo_result_t *dst_result)
Copy utilization example app cargo result.
Definition: i2c_example_cargo.c:275
i2c_example_cargo_command
bool i2c_example_cargo_command(uint32_t command)
Send command to be executed to cargo i2c app.
Definition: i2c_example_cargo.c:219
i2c_example_cargo_get_measure_counter
uint32_t i2c_example_cargo_get_measure_counter(void)
Get the count of number of measurements performed.
Definition: i2c_example_cargo.c:253
cargo_config_t
Configuration struct for cargo.
Definition: example_cargo.h:43
example_cargo.h
i2c_example_cargo_copy_presence_burst_result_fields
void i2c_example_cargo_copy_presence_burst_result_fields(cargo_result_t *dst_result)
Copy presence example app cargo result.
Definition: i2c_example_cargo.c:289
i2c_example_cargo_get_temperature
int16_t i2c_example_cargo_get_temperature(void)
Get most recently measured temperature.
Definition: i2c_example_cargo.c:303
cargo_result_t
Result type.
Definition: example_cargo.h:109
i2c_example_cargo_get_config
cargo_config_t * i2c_example_cargo_get_config(void)
Get pointer to internal cargo config struct.
Definition: i2c_example_cargo.c:214