[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:
Nikolay Minaylov
2022-01-21 19:55:44 +03:00
committed by GitHub
parent d4d87aa6a8
commit d4787e859e
35 changed files with 968 additions and 182 deletions

View File

@@ -385,7 +385,7 @@ static const struct CdcConfigDescriptorDual
static struct usb_cdc_line_coding cdc_config[IF_NUM_MAX] = {};
static uint8_t cdc_ctrl_line_state[IF_NUM_MAX];
static void cdc_init(usbd_device* dev, UsbInterface* intf);
static void cdc_init(usbd_device* dev, FuriHalUsbInterface* intf);
static void cdc_deinit(usbd_device* dev);
static void cdc_on_wakeup(usbd_device* dev);
static void cdc_on_suspend(usbd_device* dev);
@@ -393,12 +393,12 @@ static void cdc_on_suspend(usbd_device* dev);
static usbd_respond cdc_ep_config(usbd_device* dev, uint8_t cfg);
static usbd_respond cdc_control(usbd_device* dev, usbd_ctlreq* req, usbd_rqc_callback* callback);
static usbd_device* usb_dev;
static UsbInterface* cdc_if_cur = NULL;
static FuriHalUsbInterface* cdc_if_cur = NULL;
static bool connected = false;
static CdcCallbacks* callbacks[IF_NUM_MAX] = {NULL};
static void* cb_ctx[IF_NUM_MAX];
UsbInterface usb_cdc_single = {
FuriHalUsbInterface usb_cdc_single = {
.init = cdc_init,
.deinit = cdc_deinit,
.wakeup = cdc_on_wakeup,
@@ -413,7 +413,7 @@ UsbInterface usb_cdc_single = {
.cfg_descr = (void*)&cdc_cfg_desc_single,
};
UsbInterface usb_cdc_dual = {
FuriHalUsbInterface usb_cdc_dual = {
.init = cdc_init,
.deinit = cdc_deinit,
.wakeup = cdc_on_wakeup,
@@ -428,7 +428,7 @@ UsbInterface usb_cdc_dual = {
.cfg_descr = (void*)&cdc_cfg_desc_dual,
};
static void cdc_init(usbd_device* dev, UsbInterface* intf) {
static void cdc_init(usbd_device* dev, FuriHalUsbInterface* intf) {
usb_dev = dev;
cdc_if_cur = intf;