USB-UART: New GUI (#826)
* USB-UART: new gui * Furi: use furi_console for logging instead of printf. * CDC: calling open/close callbacks on interface change * fix vcp_tx block on disconnect * USB mode set by struct pointer * FuriHal: proper event sequence on vcp reconnect * disable debug prints * HAL: add context to UART IRQ's * Context usage in UART IRQ and CDC callbacks * USB-UART: geting rid of baudrate limitations * FuriHal: remove struct pollutant in usb api. Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "furi-hal-version.h"
|
||||
#include "furi-hal-usb_i.h"
|
||||
#include "furi-hal-usb.h"
|
||||
#include <furi.h>
|
||||
|
||||
#include "usb.h"
|
||||
@@ -182,7 +183,7 @@ static struct HidReport {
|
||||
struct HidReportMouse mouse;
|
||||
} __attribute__((packed)) hid_report;
|
||||
|
||||
static void hid_init(usbd_device* dev, struct UsbInterface* intf);
|
||||
static void hid_init(usbd_device* dev, UsbInterface* intf);
|
||||
static void hid_deinit(usbd_device *dev);
|
||||
static void hid_on_wakeup(usbd_device *dev);
|
||||
static void hid_on_suspend(usbd_device *dev);
|
||||
@@ -254,7 +255,7 @@ bool furi_hal_hid_mouse_scroll(int8_t delta) {
|
||||
return state;
|
||||
}
|
||||
|
||||
struct UsbInterface usb_hid = {
|
||||
UsbInterface usb_hid = {
|
||||
.init = hid_init,
|
||||
.deinit = hid_deinit,
|
||||
.wakeup = hid_on_wakeup,
|
||||
@@ -269,7 +270,7 @@ struct UsbInterface usb_hid = {
|
||||
.cfg_descr = (void*)&hid_cfg_desc,
|
||||
};
|
||||
|
||||
static void hid_init(usbd_device* dev, struct UsbInterface* intf) {
|
||||
static void hid_init(usbd_device* dev, UsbInterface* intf) {
|
||||
if (hid_semaphore == NULL)
|
||||
hid_semaphore = osSemaphoreNew(1, 1, NULL);
|
||||
usb_dev = dev;
|
||||
|
Reference in New Issue
Block a user