openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
Loading...
Searching...
No Matches
cherry.h
Go to the documentation of this file.
1
3#pragma once
4
5#include "cherry_common.h"
6
7#include <stdbool.h>
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15struct cherry;
16
18struct cherry_core_event;
19
22 CHERRY_ERR_NONE,
23 CHERRY_ERR_INVALID_PARAMETER,
24 CHERRY_ERR_UWBS_TIMEOUT,
25 CHERRY_ERR_INTERNAL,
26 CHERRY_ERR_SESSION_INIT,
27 CHERRY_ERR_SESSION_ACTIVE,
28 CHERRY_ERR_SESSION_CONFIG,
29 CHERRY_ERR_SESSION_TYPE_NOT_SUPPORTED,
30};
31
36struct cherry_fira_capabilities;
44struct cherry_radar_capabilities;
45
51 enum cherry_err status_err;
56 struct cherry_fira_capabilities *fira_capabilities;
64 struct cherry_radar_capabilities *radar_capabilities;
65};
66
70typedef void (*cherry_core_cb_t)(struct cherry_core_event *event, void *user_data);
71
73struct cherry *cherry_create(const char *device, cherry_core_cb_t core_cb, void *user_data);
74
79void cherry_destroy_sync(struct cherry *ctx);
80
81#ifdef __cplusplus
82}
83#endif
struct cherry * cherry_create(const char *device, cherry_core_cb_t core_cb, void *user_data)
Allocate a Cherry context (NULL on allocation failure).
Definition cherry_ccc_shim.c:126
void cherry_destroy_sync(struct cherry *ctx)
Synchronously release a Cherry context and its resources.
Definition cherry_ccc_shim.c:142
void(* cherry_core_cb_t)(struct cherry_core_event *event, void *user_data)
Callback type for core (non-session) Cherry notification events.
Definition cherry.h:70
cherry_err
Status codes returned across the Cherry / CCC seam.
Definition cherry.h:21
— diagnostics config struct and report forward decl.
Device CCC/Aliro capability set advertised to the peer.
Definition cherry_ccc.h:26
UWBS capability container reported by the peer during device discovery; only the CCC capabilities mem...
Definition cherry.h:50
struct cherry_ccc_capabilities * ccc_capabilities
CCC capabilities advertised by the peer during device discovery.
Definition cherry.h:60
struct cherry_fira_capabilities * fira_capabilities
FiRa capabilities advertised by the peer during device discovery; unused on this lock.
Definition cherry.h:56
struct cherry_radar_capabilities * radar_capabilities
Radar capabilities advertised by the peer during device discovery.
Definition cherry.h:64
Opaque Cherry context holder.
Definition cherry_ccc_shim.c:27
cherry_core_cb_t core_cb
Core callback (never invoked: no UCI).
Definition cherry_ccc_shim.c:28
void * user_data
Client data from cherry_create().
Definition cherry_ccc_shim.c:29