2021-10-27 17:37:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include "../helpers/subghz_custom_event.h"
|
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
typedef struct SubGhzReadRAW SubGhzReadRAW;
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
typedef void (*SubGhzReadRAWCallback)(SubGhzCustomEvent event, void* context);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2021-11-24 13:59:45 +00:00
|
|
|
typedef enum {
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzReadRAWStatusStart,
|
|
|
|
SubGhzReadRAWStatusIDLE,
|
|
|
|
SubGhzReadRAWStatusREC,
|
|
|
|
SubGhzReadRAWStatusTX,
|
|
|
|
SubGhzReadRAWStatusTXRepeat,
|
|
|
|
|
|
|
|
SubGhzReadRAWStatusLoadKeyIDLE,
|
|
|
|
SubGhzReadRAWStatusLoadKeyTX,
|
|
|
|
SubGhzReadRAWStatusLoadKeyTXRepeat,
|
|
|
|
SubGhzReadRAWStatusSaveKey,
|
|
|
|
} SubGhzReadRAWStatus;
|
2021-11-24 13:59:45 +00:00
|
|
|
|
2021-10-27 17:37:11 +00:00
|
|
|
void subghz_read_raw_set_callback(
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzReadRAW* subghz_read_raw,
|
|
|
|
SubGhzReadRAWCallback callback,
|
2021-10-27 17:37:11 +00:00
|
|
|
void* context);
|
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzReadRAW* subghz_read_raw_alloc();
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
void subghz_read_raw_free(SubGhzReadRAW* subghz_static);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
|
|
|
void subghz_read_raw_add_data_statusbar(
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzReadRAW* instance,
|
2021-10-27 17:37:11 +00:00
|
|
|
const char* frequency_str,
|
|
|
|
const char* preset_str);
|
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
void subghz_read_raw_update_sample_write(SubGhzReadRAW* instance, size_t sample);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
void subghz_read_raw_stop_send(SubGhzReadRAW* instance);
|
2021-11-24 13:59:45 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
void subghz_read_raw_update_sin(SubGhzReadRAW* instance);
|
2021-11-24 13:59:45 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2021-12-08 15:00:54 +00:00
|
|
|
void subghz_read_raw_set_status(
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzReadRAW* instance,
|
2022-06-28 22:31:07 +00:00
|
|
|
SubGhzReadRAWStatus status,
|
2021-12-08 15:00:54 +00:00
|
|
|
const char* file_name);
|
2021-11-24 13:59:45 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
View* subghz_read_raw_get_view(SubGhzReadRAW* subghz_static);
|