flipperzero-firmware/applications/main/infrared/infrared_signal.h
SG b9a766d909 [FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages)
* Added plugin_dist target for fbt to build FAPs
* All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default
* Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them
* Added debugging support for FAPs with fbt debug & VSCode
* Added public firmware API with automated versioning

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-15 02:21:03 +09:00

42 lines
1.2 KiB
C

#pragma once
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <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, string_t name);
void infrared_signal_transmit(InfraredSignal* signal);