[FL-1506, FL-2197] Power, USB, LED driver improvements (#966)
* Power, USB, LED driver improvements * u2f hid descriptor fix * variable_item_list: value alignment fix * InputTypeRepeat handling in menu/submenu/var_item_list * lp5562: fix bugs on 400khz i2c * Scripts: lint in parallel. * FuriHal: rename some USB structure to match naming convention. Drivers: update magic values in LP5562. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ int32_t usb_mouse_app(void* p) {
|
||||
furi_check(event_queue);
|
||||
ViewPort* view_port = view_port_alloc();
|
||||
|
||||
UsbInterface* usb_mode_prev = furi_hal_usb_get_config();
|
||||
FuriHalUsbInterface* usb_mode_prev = furi_hal_usb_get_config();
|
||||
furi_hal_usb_set_config(&usb_hid);
|
||||
|
||||
view_port_draw_callback_set(view_port, usb_mouse_render_callback, NULL);
|
||||
|
@@ -15,6 +15,7 @@ typedef struct {
|
||||
typedef enum {
|
||||
UsbTestSubmenuIndexEnable,
|
||||
UsbTestSubmenuIndexDisable,
|
||||
UsbTestSubmenuIndexRestart,
|
||||
UsbTestSubmenuIndexVcpSingle,
|
||||
UsbTestSubmenuIndexVcpDual,
|
||||
UsbTestSubmenuIndexHid,
|
||||
@@ -28,6 +29,8 @@ void usb_test_submenu_callback(void* context, uint32_t index) {
|
||||
furi_hal_usb_enable();
|
||||
} else if(index == UsbTestSubmenuIndexDisable) {
|
||||
furi_hal_usb_disable();
|
||||
} else if(index == UsbTestSubmenuIndexRestart) {
|
||||
furi_hal_usb_reinit();
|
||||
} else if(index == UsbTestSubmenuIndexVcpSingle) {
|
||||
furi_hal_usb_set_config(&usb_cdc_single);
|
||||
} else if(index == UsbTestSubmenuIndexVcpDual) {
|
||||
@@ -60,6 +63,8 @@ UsbTestApp* usb_test_app_alloc() {
|
||||
app->submenu, "Enable", UsbTestSubmenuIndexEnable, usb_test_submenu_callback, app);
|
||||
submenu_add_item(
|
||||
app->submenu, "Disable", UsbTestSubmenuIndexDisable, usb_test_submenu_callback, app);
|
||||
submenu_add_item(
|
||||
app->submenu, "Restart", UsbTestSubmenuIndexRestart, usb_test_submenu_callback, app);
|
||||
submenu_add_item(
|
||||
app->submenu, "Single VCP", UsbTestSubmenuIndexVcpSingle, usb_test_submenu_callback, app);
|
||||
submenu_add_item(
|
||||
|
Reference in New Issue
Block a user