BSB Developer Docs
Loading...
Searching...
No Matches
intercom.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <furi.h>
8
9#include <stddef.h>
10#include <stdint.h>
11#include <stdbool.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
20#define RECORD_INTERCOM "intercom"
21
25typedef struct Intercom Intercom;
26
37
56
67const char* intercom_get_version_string(void);
68
80FuriState* intercom_get_state(const Intercom* instance);
81
86
94typedef void (*IntercomRxCallback)(const void* data, size_t data_size, void* context);
95
119 Intercom* instance,
120 IntercomChannelId channel_id,
121 IntercomRxCallback rx_callback,
122 void* context);
123
139size_t intercom_tx(IntercomChannel* channel, const void* data, size_t data_size, uint32_t timeout);
140
141#ifdef __cplusplus
142}
143#endif
IntercomChannelId
Enumeration of available channel identifiers.
Definition intercom.h:41
@ IntercomChannelIdMatter
Matter smart home protocol.
Definition intercom.h:50
@ IntercomChannelIdCryptoBackup
Crypto backup handling.
Definition intercom.h:48
@ IntercomChannelIdSlInfo
Wireless co-processor info channel.
Definition intercom.h:51
@ IntercomChannelIdMax
Special value for internal use.
Definition intercom.h:54
@ IntercomChannelIdWifiControl
Wireless network control handling.
Definition intercom.h:43
@ IntercomChannelIdWifiData
Wireless network data handling.
Definition intercom.h:44
@ IntercomChannelIdCli
Command line interface handling.
Definition intercom.h:46
@ IntercomChannelIdInput
Input handling.
Definition intercom.h:42
@ IntercomChannelIdTlsCrypto
TLS Crypto handling.
Definition intercom.h:49
@ IntercomChannelIdBle
BLE handling.
Definition intercom.h:47
@ IntercomChannelIdDebug
Testing, debugging, etc.
Definition intercom.h:53
@ IntercomChannelIdStatusLights
Status lights handling.
Definition intercom.h:45
IntercomStatus
Enumeration of possible Intercom statuses.
Definition intercom.h:30
@ IntercomStatusErrorSync
Sync failed (other side not responding)
Definition intercom.h:33
@ IntercomStatusUnknown
Default status on startup before sync.
Definition intercom.h:32
@ IntercomStatusOk
Other side in sync, normal operation.
Definition intercom.h:31
@ IntercomStatusErrorTimeout
Transmission timed out (no ack from other side)
Definition intercom.h:35
@ IntercomStatusErrorFraming
Corrupted frame received from other side.
Definition intercom.h:34
FuriState * intercom_get_state(const Intercom *instance)
Get the state object that supports change notifications.
Definition intercom.c:254
IntercomChannel * intercom_channel_open(Intercom *instance, IntercomChannelId channel_id, IntercomRxCallback rx_callback, void *context)
Open an Intercom channel.
Definition intercom.c:227
const char * intercom_get_version_string(void)
Get the intercom version string.
Definition intercom.c:243
void(* IntercomRxCallback)(const void *data, size_t data_size, void *context)
Receive callback function type.
Definition intercom.h:94
size_t intercom_tx(IntercomChannel *channel, const void *data, size_t data_size, uint32_t timeout)
Transmit data through Intercom.
Definition intercom.c:191
Definition intercom_i.h:37
Definition intercom_i.h:44