03140e4349
* WIP BT + USB Hid * Refactoring Submenus/Views * Changed to bool instead of enum * Revamp finished * Removed usb_keyboard * Renaming device_types that can do USB+BT * Removed error view * Renaming folder structure and file names * Fixed views.h * Fixed hid.h * Fixed hid_mouse.c * Fixed a accidetnal renaming * Apps: add missing view remove call in hid app destructor * Hid app: hal abstraction, split into bluetooth and usb remotes. Fbt: customizable icon symbol name. * Hid app: update usb remote icon * Hid: single status change routine * HID App: final touches * HID App: rename BtHidTikTok to HidTikTok, format sources * HID App: fix comma in keyboard Co-authored-by: あく <alleteam@gmail.com>
60 lines
1.6 KiB
C
60 lines
1.6 KiB
C
#pragma once
|
|
|
|
#include <furi.h>
|
|
#include <furi_hal_bt.h>
|
|
#include <furi_hal_bt_hid.h>
|
|
#include <furi_hal_usb.h>
|
|
#include <furi_hal_usb_hid.h>
|
|
|
|
#include <bt/bt_service/bt.h>
|
|
#include <gui/gui.h>
|
|
#include <gui/view.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <notification/notification.h>
|
|
|
|
#include <gui/modules/submenu.h>
|
|
#include <gui/modules/dialog_ex.h>
|
|
#include <gui/modules/popup.h>
|
|
#include "views/hid_keynote.h"
|
|
#include "views/hid_keyboard.h"
|
|
#include "views/hid_media.h"
|
|
#include "views/hid_mouse.h"
|
|
#include "views/hid_tiktok.h"
|
|
|
|
typedef enum {
|
|
HidTransportUsb,
|
|
HidTransportBle,
|
|
} HidTransport;
|
|
|
|
typedef struct Hid Hid;
|
|
|
|
struct Hid {
|
|
Bt* bt;
|
|
Gui* gui;
|
|
NotificationApp* notifications;
|
|
ViewDispatcher* view_dispatcher;
|
|
Submenu* device_type_submenu;
|
|
DialogEx* dialog;
|
|
HidKeynote* hid_keynote;
|
|
HidKeyboard* hid_keyboard;
|
|
HidMedia* hid_media;
|
|
HidMouse* hid_mouse;
|
|
HidTikTok* hid_tiktok;
|
|
|
|
HidTransport transport;
|
|
uint32_t view_id;
|
|
};
|
|
|
|
void hid_hal_keyboard_press(Hid* instance, uint16_t event);
|
|
void hid_hal_keyboard_release(Hid* instance, uint16_t event);
|
|
void hid_hal_keyboard_release_all(Hid* instance);
|
|
|
|
void hid_hal_consumer_key_press(Hid* instance, uint16_t event);
|
|
void hid_hal_consumer_key_release(Hid* instance, uint16_t event);
|
|
void hid_hal_consumer_key_release_all(Hid* instance);
|
|
|
|
void hid_hal_mouse_move(Hid* instance, int8_t dx, int8_t dy);
|
|
void hid_hal_mouse_scroll(Hid* instance, int8_t delta);
|
|
void hid_hal_mouse_press(Hid* instance, uint16_t event);
|
|
void hid_hal_mouse_release(Hid* instance, uint16_t event);
|
|
void hid_hal_mouse_release_all(Hid* instance); |