flipperzero-firmware/applications/subghz/views/subghz_read_raw.h
Skorpionm 3a86da5526
[FL-2139] SubGhz: refactoring GUI SubGhz (#910)
* SubGhz: refactoring GUI ReadRAW
* SubGhz: replacing memcpy with strcpy
* SubGhz: fix button name "Mode",  fix delete scene, fix show name when loading a key
* SubGhz: refactoring GUI SubGhz
* scene_manager: add exit from last scene API
* subghz: stop scene manager before stopping view dispatcher

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2021-12-22 16:01:20 +03:00

51 lines
1.3 KiB
C

#pragma once
#include <gui/view.h>
#include "../helpers/subghz_custom_event.h"
typedef struct SubghzReadRAW SubghzReadRAW;
typedef void (*SubghzReadRAWCallback)(SubghzCustomEvent event, void* context);
typedef enum {
SubghzReadRAWStatusStart,
SubghzReadRAWStatusIDLE,
SubghzReadRAWStatusREC,
SubghzReadRAWStatusTX,
SubghzReadRAWStatusTXRepeat,
SubghzReadRAWStatusLoadKeyIDLE,
SubghzReadRAWStatusLoadKeyTX,
SubghzReadRAWStatusLoadKeyTXRepeat,
SubghzReadRAWStatusSaveKey,
} SubghzReadRAWStatus;
void subghz_read_raw_set_callback(
SubghzReadRAW* subghz_read_raw,
SubghzReadRAWCallback callback,
void* context);
SubghzReadRAW* subghz_read_raw_alloc();
void subghz_read_raw_free(SubghzReadRAW* subghz_static);
void subghz_read_raw_add_data_statusbar(
SubghzReadRAW* instance,
const char* frequency_str,
const char* preset_str);
void subghz_read_raw_update_sample_write(SubghzReadRAW* instance, size_t sample);
void subghz_read_raw_stop_send(SubghzReadRAW* instance);
void subghz_read_raw_update_sin(SubghzReadRAW* instance);
void subghz_read_raw_add_data_rssi(SubghzReadRAW* instance, float rssi);
void subghz_read_raw_set_status(
SubghzReadRAW* instance,
SubghzReadRAWStatus satus,
const char* file_name);
View* subghz_read_raw_get_view(SubghzReadRAW* subghz_static);