2021-10-27 20:37:11 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
2023-06-18 20:25:40 +03:00
|
|
|
#include "../helpers/subghz_types.h"
|
2021-10-27 20:37:11 +03:00
|
|
|
#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-10-02 08:50:41 +03:00
|
|
|
SubGhzReadRAW* subghz_read_raw_alloc(bool raw_send_only);
|
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);
|
|
|
|
|
2023-06-18 20:25:40 +03:00
|
|
|
void subghz_read_raw_set_radio_device_type(
|
|
|
|
SubGhzReadRAW* instance,
|
|
|
|
SubGhzRadioDeviceType device_type);
|
|
|
|
|
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-10-26 18:13:00 +03:00
|
|
|
void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi, bool trace);
|
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,
|
2022-07-25 17:35:02 +03:00
|
|
|
SubGhzReadRAWStatus status,
|
2022-10-26 18:13:00 +03:00
|
|
|
const char* file_name,
|
|
|
|
float raw_threshold_rssi);
|
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);
|