2021-10-06 09:24:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "usb.h"
|
|
|
|
|
2021-10-13 16:38:24 +00:00
|
|
|
/** USB device modes */
|
2021-10-06 09:24:09 +00:00
|
|
|
typedef enum {
|
|
|
|
UsbModeNone,
|
|
|
|
UsbModeVcpSingle,
|
|
|
|
UsbModeVcpDual,
|
|
|
|
UsbModeHid,
|
|
|
|
UsbModeU2F,
|
|
|
|
|
|
|
|
UsbModesNum,
|
|
|
|
} UsbMode;
|
|
|
|
|
2021-10-13 16:38:24 +00:00
|
|
|
/** USB device low-level initialization
|
|
|
|
*/
|
2021-10-06 09:24:09 +00:00
|
|
|
void furi_hal_usb_init();
|
|
|
|
|
2021-10-13 16:38:24 +00:00
|
|
|
/** Set USB device configuration
|
|
|
|
*
|
|
|
|
* @param mode new USB device mode
|
|
|
|
*/
|
2021-10-06 09:24:09 +00:00
|
|
|
void furi_hal_usb_set_config(UsbMode mode);
|
|
|
|
|
2021-10-13 16:38:24 +00:00
|
|
|
/** Get USB device configuration
|
|
|
|
*
|
|
|
|
* @return current USB device mode
|
|
|
|
*/
|
|
|
|
UsbMode furi_hal_usb_get_config();
|
|
|
|
|
|
|
|
/** Disable USB device
|
|
|
|
*/
|
2021-10-06 09:24:09 +00:00
|
|
|
void furi_hal_usb_disable();
|
|
|
|
|
2021-10-13 16:38:24 +00:00
|
|
|
/** Enable USB device
|
|
|
|
*/
|
2021-10-06 09:24:09 +00:00
|
|
|
void furi_hal_usb_enable();
|