[FL-2433, FL-2408] Get rid of file_worker in archive and various fixes (#1105)
* Archive: get rid of file_worker and various fixes * USB init moved to CLI service
This commit is contained in:
@@ -55,10 +55,9 @@ void furi_hal_init() {
|
||||
furi_hal_crypto_init();
|
||||
furi_hal_crc_init(true);
|
||||
|
||||
// VCP + USB
|
||||
// USB
|
||||
#ifndef FURI_RAM_EXEC
|
||||
furi_hal_usb_init();
|
||||
furi_hal_vcp_init();
|
||||
FURI_LOG_I(TAG, "USB OK");
|
||||
#endif
|
||||
|
||||
|
@@ -268,8 +268,8 @@ static int32_t furi_hal_usb_thread(void* context) {
|
||||
usbd_reg_event(&udev, usbd_evt_reset, reset_evt);
|
||||
FURI_LOG_I(TAG, "USB Mode change done");
|
||||
usb.enabled = true;
|
||||
usb.if_cur = if_new;
|
||||
}
|
||||
usb.if_cur = if_new;
|
||||
}
|
||||
if(flags & EventEnable) {
|
||||
if((!usb.enabled) && (usb.if_cur != NULL)) {
|
||||
|
@@ -12,15 +12,14 @@
|
||||
#define VCP_IF_NUM 0
|
||||
|
||||
typedef enum {
|
||||
VcpEvtReserved = (1 << 0), // Reserved for StreamBuffer internal event
|
||||
VcpEvtEnable = (1 << 1),
|
||||
VcpEvtDisable = (1 << 2),
|
||||
VcpEvtConnect = (1 << 3),
|
||||
VcpEvtDisconnect = (1 << 4),
|
||||
VcpEvtStreamRx = (1 << 5),
|
||||
VcpEvtRx = (1 << 6),
|
||||
VcpEvtStreamTx = (1 << 7),
|
||||
VcpEvtTx = (1 << 8),
|
||||
VcpEvtEnable = (1 << 0),
|
||||
VcpEvtDisable = (1 << 1),
|
||||
VcpEvtConnect = (1 << 2),
|
||||
VcpEvtDisconnect = (1 << 3),
|
||||
VcpEvtStreamRx = (1 << 4),
|
||||
VcpEvtRx = (1 << 5),
|
||||
VcpEvtStreamTx = (1 << 6),
|
||||
VcpEvtTx = (1 << 7),
|
||||
} WorkerEvtFlags;
|
||||
|
||||
#define VCP_THREAD_FLAG_ALL \
|
||||
|
Reference in New Issue
Block a user