Flipper Zero Firmware
Loading...
Searching...
No Matches
infrared_worker.h
1#pragma once
2
3#include <infrared.h>
4#include <furi_hal.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define MAX_TIMINGS_AMOUNT 1024U
11
13typedef struct InfraredWorker InfraredWorker;
16
17typedef enum {
18 InfraredWorkerGetSignalResponseNew,
19 InfraredWorkerGetSignalResponseSame,
20 InfraredWorkerGetSignalResponseStop,
21} InfraredWorkerGetSignalResponse;
22
26typedef InfraredWorkerGetSignalResponse (
27 *InfraredWorkerGetSignalCallback)(void* context, InfraredWorker* instance);
28
30typedef void (*InfraredWorkerMessageSentCallback)(void* context);
31
33typedef void (
34 *InfraredWorkerReceivedSignalCallback)(void* context, InfraredWorkerSignal* received_signal);
35
40InfraredWorker* infrared_worker_alloc(void);
41
46void infrared_worker_free(InfraredWorker* instance);
47
52void infrared_worker_rx_start(InfraredWorker* instance);
53
58void infrared_worker_rx_stop(InfraredWorker* instance);
59
66void infrared_worker_rx_set_received_signal_callback(
67 InfraredWorker* instance,
68 InfraredWorkerReceivedSignalCallback callback,
69 void* context);
70
77void infrared_worker_rx_enable_blink_on_receiving(InfraredWorker* instance, bool enable);
78
85void infrared_worker_rx_enable_signal_decoding(InfraredWorker* instance, bool enable);
86
92bool infrared_worker_signal_is_decoded(const InfraredWorkerSignal* signal);
93
100void infrared_worker_tx_start(InfraredWorker* instance);
101
106void infrared_worker_tx_stop(InfraredWorker* instance);
107
114void infrared_worker_tx_set_get_signal_callback(
115 InfraredWorker* instance,
116 InfraredWorkerGetSignalCallback callback,
117 void* context);
118
125void infrared_worker_tx_set_signal_sent_callback(
126 InfraredWorker* instance,
127 InfraredWorkerMessageSentCallback callback,
128 void* context);
129
140InfraredWorkerGetSignalResponse
141 infrared_worker_tx_get_signal_steady_callback(void* context, InfraredWorker* instance);
142
150void infrared_worker_get_raw_signal(
151 const InfraredWorkerSignal* signal,
152 const uint32_t** timings,
153 size_t* timings_cnt);
154
161const InfraredMessage* infrared_worker_get_decoded_signal(const InfraredWorkerSignal* signal);
162
168void infrared_worker_set_decoded_signal(InfraredWorker* instance, const InfraredMessage* message);
169
178void infrared_worker_set_raw_signal(
179 InfraredWorker* instance,
180 const uint32_t* timings,
181 size_t timings_cnt,
182 uint32_t frequency,
183 float duty_cycle);
184
185#ifdef __cplusplus
186}
187#endif
Furi HAL API.
Definition infrared.h:42
Definition infrared_worker.c:52
Definition infrared_worker.c:38