subbrute_radio_device_loader.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <lib/subghz/devices/devices.h>
  3. /**
  4. * @file subghz_radio.h
  5. * @brief Defines the Sub-GHz radio device type.
  6. */
  7. typedef enum {
  8. SubGhzRadioDeviceTypeInternal,
  9. SubGhzRadioDeviceTypeExternalCC1101,
  10. } SubGhzRadioDeviceType;
  11. /**
  12. * @brief Sets the SubGhz radio device type.
  13. *
  14. * This function is used to set the SubGhz radio device type for the SubBrute radio device loader.
  15. *
  16. * @param current_radio_device Pointer to the current SubGhz radio device.
  17. * @param radio_device_type The desired SubGhz radio device type.
  18. * @return const SubGhzDevice* Pointer to the new SubGhz radio device.
  19. *
  20. * @remark This function sets the SubGhz radio device type for the SubBrute radio device loader.
  21. * The current radio device will be replaced with a new instance of the specified radio device type.
  22. * If @p current_radio_device is NULL, a new instance of the specified radio device type will be created.
  23. *
  24. * @note The caller is responsible for handling memory deallocation of the returned pointer.
  25. */
  26. const SubGhzDevice* subbrute_radio_device_loader_set(
  27. const SubGhzDevice* current_radio_device,
  28. SubGhzRadioDeviceType radio_device_type);
  29. /**
  30. * @brief Unloads a SubGhz radio device.
  31. *
  32. * This function unloads a SubGhz radio device and performs any necessary cleanup.
  33. *
  34. * @param radio_device Pointer to the SubGhzDevice structure representing the radio device to be unloaded.
  35. */
  36. void subbrute_radio_device_loader_end(const SubGhzDevice* radio_device);