furi-hal-bt.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #pragma once
  2. #include <m-string.h>
  3. #include <stdbool.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /** Initialize */
  8. void furi_hal_bt_init();
  9. /** Start BLE app */
  10. bool furi_hal_bt_start_app();
  11. /** Get BT/BLE system component state */
  12. void furi_hal_bt_dump_state(string_t buffer);
  13. /** Get BT/BLE system component state */
  14. bool furi_hal_bt_is_alive();
  15. /** Wait for Core2 startup */
  16. bool furi_hal_bt_wait_startup();
  17. /**
  18. * Lock shared access to flash controller
  19. * @return true if lock was successful, false if not
  20. */
  21. bool furi_hal_bt_lock_flash();
  22. /** Unlock shared access to flash controller */
  23. void furi_hal_bt_unlock_flash();
  24. /** Start ble tone tx at given channel and power */
  25. void furi_hal_bt_start_tone_tx(uint8_t channel, uint8_t power);
  26. /** Stop ble tone tx */
  27. void furi_hal_bt_stop_tone_tx();
  28. /** Start sending ble packets at a given frequency and datarate */
  29. void furi_hal_bt_start_packet_tx(uint8_t channel, uint8_t pattern, uint8_t datarate);
  30. /** Stop sending ble packets */
  31. uint16_t furi_hal_bt_stop_packet_test();
  32. /** Start receiving packets */
  33. void furi_hal_bt_start_packet_rx(uint8_t channel, uint8_t datarate);
  34. /** Set up the RF to listen to a given RF channel */
  35. void furi_hal_bt_start_rx(uint8_t channel);
  36. /** Stop RF listenning */
  37. void furi_hal_bt_stop_rx();
  38. /** Get RSSI */
  39. float furi_hal_bt_get_rssi();
  40. /** Get number of transmitted packets */
  41. uint32_t furi_hal_bt_get_transmitted_packets();
  42. #ifdef __cplusplus
  43. }
  44. #endif