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