mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 02:41:36 +03:00
052237f8c9
* IR: Doxygen docs, some rename * Rename irda -> infrared * Rollback collateral renames Co-authored-by: あく <alleteam@gmail.com>
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
/**
|
|
* @file infrared_parser.h
|
|
* Infrared: Helper file for conversion Flipper File Format
|
|
* to Infrared signal class, and backwards
|
|
*/
|
|
#pragma once
|
|
|
|
#include "../infrared_app_signal.h"
|
|
#include <flipper_format/flipper_format.h>
|
|
#include <string>
|
|
|
|
/** Save Infrared signal into file
|
|
*
|
|
* @param ff - Flipper File Format instance
|
|
* @param signal - Infrared signal to save
|
|
* @param name - name for saved signal. Every
|
|
* signal on disk has name.
|
|
*/
|
|
bool infrared_parser_save_signal(
|
|
FlipperFormat* ff,
|
|
const InfraredAppSignal& signal,
|
|
const std::string& name);
|
|
|
|
/** Read Infrared signal from file
|
|
*
|
|
* @param ff - Flipper File Format instance
|
|
* @param signal - Infrared signal to read to
|
|
* @param name - name for saved signal. Every
|
|
* signal in file has name.
|
|
*/
|
|
bool infrared_parser_read_signal(FlipperFormat* ff, InfraredAppSignal& signal, std::string& name);
|
|
|
|
/** Validate parsed signal
|
|
*
|
|
* @signal - signal to validate
|
|
* @retval true if valid, false otherwise
|
|
*/
|
|
bool infrared_parser_is_parsed_signal_valid(const InfraredMessage* signal);
|
|
|
|
/** Validate raw signal
|
|
*
|
|
* @signal - signal to validate
|
|
* @retval true if valid, false otherwise
|
|
*/
|
|
bool infrared_parser_is_raw_signal_valid(
|
|
uint32_t frequency,
|
|
float duty_cycle,
|
|
uint32_t timings_cnt);
|