subghz_read_raw.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include <gui/view.h>
  3. #include "../helpers/subghz_custom_event.h"
  4. typedef struct SubGhzReadRAW SubGhzReadRAW;
  5. typedef void (*SubGhzReadRAWCallback)(SubGhzCustomEvent event, void* context);
  6. typedef enum {
  7. SubGhzReadRAWStatusStart,
  8. SubGhzReadRAWStatusIDLE,
  9. SubGhzReadRAWStatusREC,
  10. SubGhzReadRAWStatusTX,
  11. SubGhzReadRAWStatusTXRepeat,
  12. SubGhzReadRAWStatusLoadKeyIDLE,
  13. SubGhzReadRAWStatusLoadKeyTX,
  14. SubGhzReadRAWStatusLoadKeyTXRepeat,
  15. SubGhzReadRAWStatusSaveKey,
  16. } SubGhzReadRAWStatus;
  17. void subghz_read_raw_set_callback(
  18. SubGhzReadRAW* subghz_read_raw,
  19. SubGhzReadRAWCallback callback,
  20. void* context);
  21. SubGhzReadRAW* subghz_read_raw_alloc();
  22. void subghz_read_raw_free(SubGhzReadRAW* subghz_static);
  23. void subghz_read_raw_add_data_statusbar(
  24. SubGhzReadRAW* instance,
  25. const char* frequency_str,
  26. const char* preset_str);
  27. void subghz_read_raw_update_sample_write(SubGhzReadRAW* instance, size_t sample);
  28. void subghz_read_raw_stop_send(SubGhzReadRAW* instance);
  29. void subghz_read_raw_update_sin(SubGhzReadRAW* instance);
  30. void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi);
  31. void subghz_read_raw_set_status(
  32. SubGhzReadRAW* instance,
  33. SubGhzReadRAWStatus satus,
  34. const char* file_name);
  35. View* subghz_read_raw_get_view(SubGhzReadRAW* subghz_static);