2021-12-08 11:28:01 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2022-09-14 16:11:38 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-12-08 11:28:01 +00:00
|
|
|
/** Start Hid Keyboard Profile
|
|
|
|
*/
|
|
|
|
void furi_hal_bt_hid_start();
|
|
|
|
|
|
|
|
/** Stop Hid Keyboard Profile
|
|
|
|
*/
|
|
|
|
void furi_hal_bt_hid_stop();
|
|
|
|
|
2021-12-15 17:39:06 +00:00
|
|
|
/** Press keyboard button
|
2021-12-08 11:28:01 +00:00
|
|
|
*
|
|
|
|
* @param button button code from HID specification
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_kb_press(uint16_t button);
|
|
|
|
|
2021-12-15 17:39:06 +00:00
|
|
|
/** Release keyboard button
|
2021-12-08 11:28:01 +00:00
|
|
|
*
|
|
|
|
* @param button button code from HID specification
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_kb_release(uint16_t button);
|
|
|
|
|
2021-12-15 17:39:06 +00:00
|
|
|
/** Release all keyboard buttons
|
2021-12-08 11:28:01 +00:00
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_kb_release_all();
|
2021-12-15 17:39:06 +00:00
|
|
|
|
2022-07-08 12:36:34 +00:00
|
|
|
/** Set mouse movement and send HID report
|
2021-12-15 17:39:06 +00:00
|
|
|
*
|
2022-07-08 12:36:34 +00:00
|
|
|
* @param dx x coordinate delta
|
|
|
|
* @param dy y coordinate delta
|
2021-12-15 17:39:06 +00:00
|
|
|
*/
|
2022-07-08 12:36:34 +00:00
|
|
|
bool furi_hal_bt_hid_mouse_move(int8_t dx, int8_t dy);
|
2021-12-15 17:39:06 +00:00
|
|
|
|
2022-07-08 12:36:34 +00:00
|
|
|
/** Set mouse button to pressed state and send HID report
|
2021-12-15 17:39:06 +00:00
|
|
|
*
|
2022-07-08 12:36:34 +00:00
|
|
|
* @param button key code
|
2021-12-15 17:39:06 +00:00
|
|
|
*/
|
2022-07-08 12:36:34 +00:00
|
|
|
bool furi_hal_bt_hid_mouse_press(uint8_t button);
|
2021-12-15 17:39:06 +00:00
|
|
|
|
2022-07-08 12:36:34 +00:00
|
|
|
/** Set mouse button to released state and send HID report
|
2021-12-15 17:39:06 +00:00
|
|
|
*
|
2022-07-08 12:36:34 +00:00
|
|
|
* @param button key code
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_mouse_release(uint8_t button);
|
|
|
|
|
|
|
|
/** Set mouse button to released state and send HID report
|
|
|
|
*
|
|
|
|
* @param button key code
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_mouse_release_all();
|
|
|
|
|
|
|
|
/** Set mouse wheel position and send HID report
|
|
|
|
*
|
|
|
|
* @param delta number of scroll steps
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_mouse_scroll(int8_t delta);
|
|
|
|
|
|
|
|
/** Set the following consumer key to pressed state and send HID report
|
|
|
|
*
|
|
|
|
* @param button key code
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_consumer_key_press(uint16_t button);
|
|
|
|
|
|
|
|
/** Set the following consumer key to released state and send HID report
|
|
|
|
*
|
|
|
|
* @param button key code
|
|
|
|
*/
|
|
|
|
bool furi_hal_bt_hid_consumer_key_release(uint16_t button);
|
|
|
|
|
|
|
|
/** Set consumer key to released state and send HID report
|
|
|
|
*
|
|
|
|
* @param button key code
|
2021-12-15 17:39:06 +00:00
|
|
|
*/
|
2022-07-08 12:36:34 +00:00
|
|
|
bool furi_hal_bt_hid_consumer_key_release_all();
|
2022-09-14 16:11:38 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|