unleashed-firmware/applications/subghz/subghz_history.h
Skorpionm e17336498d
[FL-1756, FL-1769, FL-1776, FL-1759] Gui: input events complementary V3, refactoring. SubGhz: read/emulate fixes. Cleanup. (#684)
* Gui: move rotation logic to ViewPort, replace delayed View switch in ViewDispatcher with event filtering and redirection to previous view.
* SubGhz: add function description
* Gui, Input: add event id to input events.
* SubGhz: fix "crashing on ?"
* SubGhz: add icon scanning
* SubGhz: updated interface read scene,  updated interface config scene
* Assets: update subghz assets
* SubGhz:  replaced the picture in the read scene, changed the paths to additional files
* SubGhz: fix deadlock in timer callback
* SubGhz: fix icon read scene
* SubGhz: fix icon read scene
* SubGhz: fix duble text transmitter scene
* SubGhz: correct spelling. Gui: bigger queue for ViewDispatcher.
* SubGhz: fix creation and transmission of dynamic code without the presence of a manufactory key
* SubGhz: fix keelog, setting a name in the absence of a manufactory key
* SubGhz: fix load bad keelog key
* Format sources
* Furi: remove garbage from core. GpioTester: fix memory leak and cleanup
* Accessor: remove obsolete notification code
* MusicPlayer: remove input event injection
* Input: rename id to sequence

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-09-02 00:05:00 +03:00

107 lines
3.0 KiB
C

#pragma once
#include <lib/subghz/protocols/subghz_protocol_common.h>
typedef struct SubGhzHistory SubGhzHistory;
/** Allocate SubGhzHistory
*
* @return SubGhzHistory*
*/
SubGhzHistory* subghz_history_alloc(void);
/** Free SubGhzHistory
*
* @param instance - SubGhzHistory instance
*/
void subghz_history_free(SubGhzHistory* instance);
/** Clear history
*
* @param instance - SubGhzHistory instance
*/
void subghz_history_clean(SubGhzHistory* instance);
/** Set frequency and preset to history[idx]
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @param frequency - frequency Hz
* @param preset - FuriHalSubGhzPreset preset
*/
void subghz_history_set_frequency_preset(
SubGhzHistory* instance,
uint16_t idx,
uint32_t frequency,
FuriHalSubGhzPreset preset);
/** Get frequency to history[idx]
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @return frequency - frequency Hz
*/
uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx);
/** Get preset to history[idx]
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @return preset - FuriHalSubGhzPreset preset
*/
FuriHalSubGhzPreset subghz_history_get_preset(SubGhzHistory* instance, uint16_t idx);
/** Get history index write
*
* @param instance - SubGhzHistory instance
* @return idx - current record index
*/
uint16_t subghz_history_get_item(SubGhzHistory* instance);
/** Get type protocol to history[idx]
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @return type - type protocol
*/
uint8_t subghz_history_get_type_protocol(SubGhzHistory* instance, uint16_t idx);
/** Get name protocol to history[idx]
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @return name - const char* name protocol
*/
const char* subghz_history_get_name(SubGhzHistory* instance, uint16_t idx);
/** Get string item menu to history[idx]
*
* @param instance - SubGhzHistory instance
* @param output - string_t output
* @param idx - record index
*/
void subghz_history_get_text_item_menu(SubGhzHistory* instance, string_t output, uint16_t idx);
/** Get string the remaining number of records to history
*
* @param instance - SubGhzHistory instance
* @param output - string_t output
* @return bool - is FUUL
*/
bool subghz_history_get_text_space_left(SubGhzHistory* instance, string_t output);
/** Add protocol to history
*
* @param instance - SubGhzHistory instance
* @param context - SubGhzProtocolCommon context
*/
void subghz_history_add_to_history(SubGhzHistory* instance, void* context);
/** Get SubGhzProtocolCommonLoad to load into the protocol decoder bin data
*
* @param instance - SubGhzHistory instance
* @param idx - record index
* @return SubGhzProtocolCommonLoad*
*/
SubGhzProtocolCommonLoad* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx);