luat_nimble.h 564 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef LUAT_NUMBLE_H
  2. #define LUAT_NUMBLE_H
  3. #include "luat_base.h"
  4. #include "luat_msgbus.h"
  5. /** Bluetooth Adapter State */
  6. typedef enum
  7. {
  8. BT_STATE_OFF,
  9. BT_STATE_ON,
  10. BT_STATE_CONNECTED,
  11. BT_STATE_DISCONNECT,
  12. } bt_state_t;
  13. typedef enum
  14. {
  15. BT_MODE_BLE_SERVER,
  16. BT_MODE_BLE_CLIENT,
  17. BT_MODE_BLE_BEACON,
  18. BT_MODE_BLE_MESH,
  19. } bt_mode_t;
  20. int luat_nimble_trace_level(int level);
  21. int luat_nimble_init(uint8_t uart_idx, char* name, int mode);
  22. int luat_nimble_deinit();
  23. int luat_nimble_server_send(int id, char* data, size_t len);
  24. #endif