subghz_protocol_keeloq.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include "subghz_protocol_common.h"
  3. typedef struct SubGhzProtocolKeeloq SubGhzProtocolKeeloq;
  4. /** Allocate SubGhzProtocolKeeloq
  5. *
  6. * @return SubGhzProtocolKeeloq*
  7. */
  8. SubGhzProtocolKeeloq* subghz_protocol_keeloq_alloc();
  9. /** Free SubGhzProtocolKeeloq
  10. *
  11. * @param instance
  12. */
  13. void subghz_protocol_keeloq_free(SubGhzProtocolKeeloq* instance);
  14. /** Loading of manufacture keys
  15. *
  16. * @param instance - SubGhzProtocolKeeloq instance
  17. * @param name - key name
  18. * @param key - manufacture (64bit)
  19. * @param type - type manufacture key
  20. */
  21. void subghz_protocol_keeloq_add_manafacture_key(SubGhzProtocolKeeloq* instance, const char* name, uint64_t key, uint16_t type);
  22. /** Sends the key on the air
  23. *
  24. * @param instance - SubGhzProtocolKeeloq instance
  25. * @param key - key send
  26. * @param bit - count bit key
  27. * @param repeat - repeat send key
  28. */
  29. void subghz_protocol_keeloq_send_key(SubGhzProtocolKeeloq* instance, uint64_t key, uint8_t bit, uint8_t repeat);
  30. /** Parse accepted duration
  31. *
  32. * @param instance - SubGhzProtocolKeeloq instance
  33. * @param data - LevelPair data
  34. */
  35. void subghz_protocol_keeloq_parse(SubGhzProtocolKeeloq* instance, LevelPair data);
  36. /** Outputting information from the parser
  37. *
  38. * @param instance - SubGhzProtocolKeeloq* instance
  39. * @param output - output string
  40. */
  41. void subghz_protocol_keeloq_to_str(SubGhzProtocolKeeloq* instance, string_t output);