raw.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "base.h"
  3. #define SUBGHZ_PROTOCOL_RAW_NAME "RAW"
  4. typedef void (*SubGhzProtocolEncoderRAWCallbackEnd)(void* context);
  5. typedef struct SubGhzProtocolDecoderRAW SubGhzProtocolDecoderRAW;
  6. typedef struct SubGhzProtocolEncoderRAW SubGhzProtocolEncoderRAW;
  7. extern const SubGhzProtocolDecoder subghz_protocol_raw_decoder;
  8. extern const SubGhzProtocolEncoder subghz_protocol_raw_encoder;
  9. extern const SubGhzProtocol subghz_protocol_raw;
  10. bool subghz_protocol_raw_save_to_file_init(
  11. SubGhzProtocolDecoderRAW* instance,
  12. const char* dev_name,
  13. uint32_t frequency,
  14. FuriHalSubGhzPreset preset);
  15. void subghz_protocol_raw_save_to_file_stop(SubGhzProtocolDecoderRAW* instance);
  16. size_t subghz_protocol_raw_get_sample_write(SubGhzProtocolDecoderRAW* instance);
  17. void* subghz_protocol_decoder_raw_alloc(SubGhzEnvironment* environment);
  18. void subghz_protocol_decoder_raw_free(void* context);
  19. void subghz_protocol_decoder_raw_reset(void* context);
  20. void subghz_protocol_decoder_raw_feed(void* context, bool level, uint32_t duration);
  21. void subghz_protocol_decoder_raw_get_string(void* context, string_t output);
  22. void* subghz_protocol_encoder_raw_alloc(SubGhzEnvironment* environment);
  23. void subghz_protocol_encoder_raw_free(void* context);
  24. void subghz_protocol_encoder_raw_stop(void* context);
  25. void subghz_protocol_raw_file_encoder_worker_callback_end(void* context);
  26. void subghz_protocol_raw_file_encoder_worker_set_callback_end(
  27. SubGhzProtocolEncoderRAW* instance,
  28. SubGhzProtocolEncoderRAWCallbackEnd callback_end,
  29. void* context_end);
  30. void subghz_protocol_raw_gen_fff_data(FlipperFormat* flipper_format, const char* file_name);
  31. bool subghz_protocol_encoder_raw_deserialize(void* context, FlipperFormat* flipper_format);
  32. LevelDuration subghz_protocol_encoder_raw_yield(void* context);