-
Notifications
You must be signed in to change notification settings - Fork 8
/
xremote_signal.h
33 lines (26 loc) · 1.19 KB
/
xremote_signal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*!
* @file flipper-xremote/xremote_signal.h
@license This project is released under the GNU GPLv3 License
* @copyright (c) 2023 Sandro Kalatozishvili (s.kalatoz@gmail.com)
*
* @brief Implementation of infrared signal receiver functionality
*/
#pragma once
#include "xremote_app.h"
#include "infrared/infrared_signal.h"
typedef void (*XRemoteRxCallback)(void* context, InfraredSignal* signal);
typedef struct XRemoteSignalReceiver XRemoteSignalReceiver;
void xremote_signal_receiver_free(XRemoteSignalReceiver* rx_ctx);
XRemoteSignalReceiver* xremote_signal_receiver_alloc(XRemoteAppContext* app_ctx);
InfraredSignal* xremote_signal_receiver_get_signal(XRemoteSignalReceiver* rx_ctx);
void xremote_signal_receiver_set_context(
XRemoteSignalReceiver* rx_ctx,
void* context,
XRemoteClearCallback on_clear);
void xremote_signal_receiver_set_rx_callback(
XRemoteSignalReceiver* rx_ctx,
XRemoteRxCallback rx_callback);
void xremote_signal_receiver_detach(XRemoteSignalReceiver* rx_ctx);
void xremote_signal_receiver_attach(XRemoteSignalReceiver* rx_ctx);
void xremote_signal_receiver_start(XRemoteSignalReceiver* rx_ctx);
void xremote_signal_receiver_stop(XRemoteSignalReceiver* rx_ctx);