1 /*
2  * Copyright (c) 2023 Google LLC
3  * Copyright (c) 2025 Croxel Inc.
4  * Copyright (c) 2025 CogniPilot Foundation
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #ifndef ZEPHYR_DRIVERS_SENSOR_AFBR_S50_DECODER_H_
10 #define ZEPHYR_DRIVERS_SENSOR_AFBR_S50_DECODER_H_
11 
12 #include <stdint.h>
13 #include <zephyr/drivers/sensor.h>
14 #include <api/argus_res.h>
15 
16 struct afbr_s50_edata {
17 	struct {
18 		uint64_t timestamp;
19 		uint8_t channels : 2;
20 		uint8_t events : 1;
21 	} header;
22 	argus_results_t payload;
23 };
24 
25 uint8_t afbr_s50_encode_channel(uint16_t chan);
26 uint8_t afbr_s50_encode_event(enum sensor_trigger_type trigger);
27 
28 int afbr_s50_get_decoder(const struct device *dev,
29 			 const struct sensor_decoder_api **decoder);
30 
31 #endif /* ZEPHYR_DRIVERS_SENSOR_AFBR_S50_DECODER_H_ */
32