subghz_protocol_gate_tx.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include "subghz_protocol_common.h"
  3. typedef struct SubGhzProtocolGateTX SubGhzProtocolGateTX;
  4. /** Allocate SubGhzProtocolGateTX
  5. *
  6. * @return SubGhzProtocolGateTX*
  7. */
  8. SubGhzProtocolGateTX* subghz_protocol_gate_tx_alloc();
  9. /** Free SubGhzProtocolGateTX
  10. *
  11. * @param instance
  12. */
  13. void subghz_protocol_gate_tx_free(SubGhzProtocolGateTX* instance);
  14. /** Sends the key on the air
  15. *
  16. * @param instance - SubGhzProtocolGateTX instance
  17. * @param key - key send
  18. * @param bit - count bit key
  19. * @param repeat - repeat send key
  20. */
  21. void subghz_protocol_gate_tx_send_key(SubGhzProtocolGateTX* instance, uint64_t key, uint8_t bit, uint8_t repeat);
  22. /** Reset internal state
  23. * @param instance - SubGhzProtocolGateTX instance
  24. */
  25. void subghz_protocol_gate_tx_reset(SubGhzProtocolGateTX* instance);
  26. /** Parse accepted duration
  27. *
  28. * @param instance - SubGhzProtocolGateTX instance
  29. * @param data - LevelDuration level_duration
  30. */
  31. void subghz_protocol_gate_tx_parse(SubGhzProtocolGateTX* instance, bool level, uint32_t duration);
  32. /** Outputting information from the parser
  33. *
  34. * @param instance - SubGhzProtocolFaacSLH* instance
  35. * @param output - output string
  36. */
  37. void subghz_protocol_gate_tx_to_str(SubGhzProtocolGateTX* instance, string_t output);