furi_hal_bt_hid.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /** Start Hid Keyboard Profile
  8. */
  9. void furi_hal_bt_hid_start();
  10. /** Stop Hid Keyboard Profile
  11. */
  12. void furi_hal_bt_hid_stop();
  13. /** Press keyboard button
  14. *
  15. * @param button button code from HID specification
  16. *
  17. * @return true on success
  18. */
  19. bool furi_hal_bt_hid_kb_press(uint16_t button);
  20. /** Release keyboard button
  21. *
  22. * @param button button code from HID specification
  23. *
  24. * @return true on success
  25. */
  26. bool furi_hal_bt_hid_kb_release(uint16_t button);
  27. /** Release all keyboard buttons
  28. *
  29. * @return true on success
  30. */
  31. bool furi_hal_bt_hid_kb_release_all();
  32. /** Set mouse movement and send HID report
  33. *
  34. * @param dx x coordinate delta
  35. * @param dy y coordinate delta
  36. */
  37. bool furi_hal_bt_hid_mouse_move(int8_t dx, int8_t dy);
  38. /** Set mouse button to pressed state and send HID report
  39. *
  40. * @param button key code
  41. */
  42. bool furi_hal_bt_hid_mouse_press(uint8_t button);
  43. /** Set mouse button to released state and send HID report
  44. *
  45. * @param button key code
  46. */
  47. bool furi_hal_bt_hid_mouse_release(uint8_t button);
  48. /** Set mouse button to released state and send HID report
  49. *
  50. * @param button key code
  51. */
  52. bool furi_hal_bt_hid_mouse_release_all();
  53. /** Set mouse wheel position and send HID report
  54. *
  55. * @param delta number of scroll steps
  56. */
  57. bool furi_hal_bt_hid_mouse_scroll(int8_t delta);
  58. /** Set the following consumer key to pressed state and send HID report
  59. *
  60. * @param button key code
  61. */
  62. bool furi_hal_bt_hid_consumer_key_press(uint16_t button);
  63. /** Set the following consumer key to released state and send HID report
  64. *
  65. * @param button key code
  66. */
  67. bool furi_hal_bt_hid_consumer_key_release(uint16_t button);
  68. /** Set consumer key to released state and send HID report
  69. *
  70. * @param button key code
  71. */
  72. bool furi_hal_bt_hid_consumer_key_release_all();
  73. #ifdef __cplusplus
  74. }
  75. #endif