mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
* ble: profile rework, initial * apps: hid: fix for pairing cleanup * app: hid: select transport based on #define * fixing PVS warnings * ble: serial service: fixed uid naming * bt service: on-demand dialog init; ble profiles: docs; battery svc: proper update * Added shci_cmd_resp_wait/shci_cmd_resp_release impl with semaphore * app: hid: separated transport code * ble: fixed service init order for serial svc; moved hardfault check to ble_glue * cli: ps: added thread prio to output, fixed heap display * ble_glue: naming changes; separate thread for event processing; * furi: added runtime stats; cli: added cpu% to `ps` * cli: fixed thread time calculation * furi: added getter for thread priority * fixing pvs warnings * hid profile: fixed naming * more naming fixes * hal: ble init small cleanup * cleanup & draft beacon api * f18: api sync * apps: moved example_custom_font from debug to examples * BLE extra beacon demo app * naming fix * UI fixes for demo app (wip) * desktop, ble svc: added statusbar icon for beacon * minor cleanup * Minor cleanup & naming fixes * api sync * Removed stale header * hal: added FURI_BLE_EXTRA_LOG for extra logging; comments & code cleanup * naming & macro fixes * quick fixes from review * Eliminated stock svc_ctl * cli: ps: removed runtime stats * minor include fixes * (void) * naming fixes * More naming fixes * fbt: always build all libs * fbt: explicitly globbing libs; dist: logging SDK path * scripts: fixed lib path precedence * hal: bt: profiles: naming changes, support for passing params to a profile; include cleanup * ble: hid: added parameter processing for profile template * api sync * BLE HID: long name trim * Removed unused check * desktop: updated beacon status icon; ble: hid: cleaner device name management * desktop: updated status icon Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: nminaylov <nm29719@gmail.com>
106 lines
3.0 KiB
C
106 lines
3.0 KiB
C
#pragma once
|
|
|
|
#include <furi_ble/profile_interface.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Optional arguments to pass along with profile template as
|
|
* FuriHalBleProfileParams for tuning profile behavior
|
|
**/
|
|
typedef struct {
|
|
const char* device_name_prefix; /**< Prefix for device name. Length must be less than 8 */
|
|
uint16_t mac_xor; /**< XOR mask for device address, for uniqueness */
|
|
} BleProfileHidParams;
|
|
|
|
/** Hid Keyboard Profile descriptor */
|
|
extern const FuriHalBleProfileTemplate* ble_profile_hid;
|
|
|
|
/** Press keyboard button
|
|
*
|
|
* @param profile profile instance
|
|
* @param button button code from HID specification
|
|
*
|
|
* @return true on success
|
|
*/
|
|
bool ble_profile_hid_kb_press(FuriHalBleProfileBase* profile, uint16_t button);
|
|
|
|
/** Release keyboard button
|
|
*
|
|
* @param profile profile instance
|
|
* @param button button code from HID specification
|
|
*
|
|
* @return true on success
|
|
*/
|
|
bool ble_profile_hid_kb_release(FuriHalBleProfileBase* profile, uint16_t button);
|
|
|
|
/** Release all keyboard buttons
|
|
*
|
|
* @param profile profile instance
|
|
* @return true on success
|
|
*/
|
|
bool ble_profile_hid_kb_release_all(FuriHalBleProfileBase* profile);
|
|
|
|
/** Set the following consumer key to pressed state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_consumer_key_press(FuriHalBleProfileBase* profile, uint16_t button);
|
|
|
|
/** Set the following consumer key to released state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_consumer_key_release(FuriHalBleProfileBase* profile, uint16_t button);
|
|
|
|
/** Set consumer key to released state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_consumer_key_release_all(FuriHalBleProfileBase* profile);
|
|
|
|
/** Set mouse movement and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param dx x coordinate delta
|
|
* @param dy y coordinate delta
|
|
*/
|
|
bool ble_profile_hid_mouse_move(FuriHalBleProfileBase* profile, int8_t dx, int8_t dy);
|
|
|
|
/** Set mouse button to pressed state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_mouse_press(FuriHalBleProfileBase* profile, uint8_t button);
|
|
|
|
/** Set mouse button to released state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_mouse_release(FuriHalBleProfileBase* profile, uint8_t button);
|
|
|
|
/** Set mouse button to released state and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param button key code
|
|
*/
|
|
bool ble_profile_hid_mouse_release_all(FuriHalBleProfileBase* profile);
|
|
|
|
/** Set mouse wheel position and send HID report
|
|
*
|
|
* @param profile profile instance
|
|
* @param delta number of scroll steps
|
|
*/
|
|
bool ble_profile_hid_mouse_scroll(FuriHalBleProfileBase* profile, int8_t delta);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|