-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinfrared_signal.h
45 lines (34 loc) · 1.36 KB
/
infrared_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
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <lib/infrared/encoder_decoder/infrared.h>
#include <flipper_format/flipper_format.h>
typedef struct InfraredSignal InfraredSignal;
typedef struct {
size_t timings_size;
uint32_t* timings;
uint32_t frequency;
float duty_cycle;
} InfraredRawSignal;
InfraredSignal* infrared_signal_alloc();
void infrared_signal_free(InfraredSignal* signal);
bool infrared_signal_is_raw(InfraredSignal* signal);
bool infrared_signal_is_valid(InfraredSignal* signal);
void infrared_signal_set_signal(InfraredSignal* signal, const InfraredSignal* other);
void infrared_signal_set_raw_signal(
InfraredSignal* signal,
const uint32_t* timings,
size_t timings_size,
uint32_t frequency,
float duty_cycle);
InfraredRawSignal* infrared_signal_get_raw_signal(InfraredSignal* signal);
void infrared_signal_set_message(InfraredSignal* signal, const InfraredMessage* message);
InfraredMessage* infrared_signal_get_message(InfraredSignal* signal);
bool infrared_signal_save(InfraredSignal* signal, FlipperFormat* ff, const char* name);
bool infrared_signal_read(InfraredSignal* signal, FlipperFormat* ff, FuriString* name);
bool infrared_signal_search_and_read(
InfraredSignal* signal,
FlipperFormat* ff,
const FuriString* name);
void infrared_signal_transmit(InfraredSignal* signal);