furi_hal_bt_hid.h 1.9 KB

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