api-hal-bt.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include <m-string.h>
  3. #include <stdbool.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Initialize */
  8. void api_hal_bt_init();
  9. /* Start BLE app */
  10. bool api_hal_bt_start_app();
  11. /* Get BT/BLE system component state */
  12. void api_hal_bt_dump_state(string_t buffer);
  13. /* Get BT/BLE system component state */
  14. bool api_hal_bt_is_alive();
  15. /* Lock shared access to flash controller
  16. * @return true if lock was successful, false if not
  17. */
  18. bool api_hal_bt_lock_flash();
  19. /* Unlock shared access to flash controller */
  20. void api_hal_bt_unlock_flash();
  21. /* Start ble tone tx at given channel and power */
  22. void api_hal_bt_start_tone_tx(uint8_t tx_channel, uint8_t power);
  23. /* Stop ble tone tx */
  24. void api_hal_bt_stop_tone_tx();
  25. /* Start sending ble packets at a given frequency and datarate */
  26. void api_hal_bt_start_packet_tx(uint8_t frequency, uint8_t datarate);
  27. /* Stop sending ble packets */
  28. void api_hal_bt_stop_packet_tx();
  29. /* Set up the RF to listen to a given RF channel */
  30. void api_hal_bt_start_rx(uint8_t frequency);
  31. /* Stop RF listenning */
  32. void api_hal_bt_stop_rx();
  33. #ifdef __cplusplus
  34. }
  35. #endif