2021-06-25 13:52:27 +00:00
|
|
|
#pragma once
|
2021-06-02 15:16:05 +00:00
|
|
|
#include <furi.h>
|
|
|
|
#include <irda.h>
|
|
|
|
|
2021-06-25 13:52:27 +00:00
|
|
|
class IrdaAppSignalTransceiver {
|
2021-06-02 15:16:05 +00:00
|
|
|
public:
|
2021-06-25 13:52:27 +00:00
|
|
|
IrdaAppSignalTransceiver(void);
|
|
|
|
~IrdaAppSignalTransceiver(void);
|
2021-06-02 15:16:05 +00:00
|
|
|
void capture_once_start(osMessageQueueId_t event_queue);
|
|
|
|
void capture_stop(void);
|
|
|
|
IrdaMessage* get_last_message(void);
|
2021-06-25 13:52:27 +00:00
|
|
|
void send_message(const IrdaMessage* message) const;
|
2021-06-02 15:16:05 +00:00
|
|
|
|
|
|
|
private:
|
2021-07-02 12:46:13 +00:00
|
|
|
bool capture_started;
|
2021-06-02 15:16:05 +00:00
|
|
|
osMessageQueueId_t event_queue;
|
|
|
|
static void irda_rx_callback(void* ctx, bool level, uint32_t duration);
|
2021-07-08 18:20:13 +00:00
|
|
|
IrdaDecoderHandler* decoder;
|
2021-06-02 15:16:05 +00:00
|
|
|
IrdaMessage message;
|
|
|
|
};
|
|
|
|
|