subghz_txrx_create_potocol_key.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #pragma once
  2. #include "subghz_types.h"
  3. #include "subghz_txrx.h"
  4. /**
  5. * Generate data for protocol
  6. *
  7. * @param instance Pointer to a SubGhzTxRx
  8. * @param preset_name Name of preset
  9. * @param frequency Frequency in Hz
  10. * @param protocol_name Name of protocol
  11. * @param key Key
  12. * @param bit Bit
  13. * @return bool True if success
  14. */
  15. bool subghz_txrx_gen_data_protocol(
  16. void* context,
  17. const char* preset_name,
  18. uint32_t frequency,
  19. const char* protocol_name,
  20. uint64_t key,
  21. uint32_t bit);
  22. /**
  23. * Generate data for protocol and te
  24. *
  25. * @param instance Pointer to a SubGhzTxRx
  26. * @param preset_name Name of preset
  27. * @param frequency Frequency in Hz
  28. * @param protocol_name Name of protocol
  29. * @param key Key
  30. * @param bit Bit
  31. * @param te Te
  32. * @return bool True if success
  33. */
  34. bool subghz_txrx_gen_data_protocol_and_te(
  35. SubGhzTxRx* instance,
  36. const char* preset_name,
  37. uint32_t frequency,
  38. const char* protocol_name,
  39. uint64_t key,
  40. uint32_t bit,
  41. uint32_t te);
  42. /**
  43. * Generate data Keeloq protocol
  44. *
  45. * @param instance Pointer to a SubGhzTxRx
  46. * @param name_preset Name of preset
  47. * @param frequency Frequency in Hz
  48. * @param name_sysmem Name of Keeloq sysmem
  49. * @param serial Serial number
  50. * @param btn Button
  51. * @param cnt Counter
  52. * @return bool True if success
  53. */
  54. bool subghz_txrx_gen_keelog_protocol(
  55. SubGhzTxRx* instance,
  56. const char* name_preset,
  57. uint32_t frequency,
  58. const char* name_sysmem,
  59. uint32_t serial,
  60. uint8_t btn,
  61. uint16_t cnt);
  62. /**
  63. * Generate data SecPlus v2 protocol
  64. *
  65. * @param instance Pointer to a SubGhzTxRx
  66. * @param name_preset Name of preset
  67. * @param frequency Frequency in Hz
  68. * @param serial Serial number
  69. * @param btn Button
  70. * @param cnt Counter
  71. * @return bool True if success
  72. */
  73. bool subghz_txrx_gen_secplus_v2_protocol(
  74. SubGhzTxRx* instance,
  75. const char* name_preset,
  76. uint32_t frequency,
  77. uint32_t serial,
  78. uint8_t btn,
  79. uint32_t cnt);
  80. /**
  81. * Generate data SecPlus v1 protocol
  82. *
  83. * @param instance Pointer to a SubGhzTxRx
  84. * @param name_preset Name of preset
  85. * @param frequency Frequency in Hz
  86. * @return bool True if success
  87. */
  88. bool subghz_txrx_gen_secplus_v1_protocol(
  89. SubGhzTxRx* instance,
  90. const char* name_preset,
  91. uint32_t frequency);