Per mikeller's comment.

This commit is contained in:
jflyper 2018-04-13 02:59:17 +09:00
parent 4adc5e0ed2
commit 0ae84bebb4
3 changed files with 5 additions and 8 deletions

View File

@ -392,12 +392,9 @@ USB_OTG_STS USB_OTG_CoreInit(USB_OTG_CORE_HANDLE *pdev)
/* Deactivate the power down*/
gccfg.d32 = 0;
gccfg.b.pwdn = 1;
#ifdef VBUS_SENSING_ENABLED
gccfg.b.vbussensingA = 1 ;
gccfg.b.vbussensingB = 1 ;
#else
// XXX Betaflight mod; disabled VBUS sensing features completely, including Sense A and B.
gccfg.b.disablevbussensing = 1;
#endif
if(pdev->cfg.Sof_output)
{

View File

@ -59,7 +59,9 @@ bool usbCableIsInserted(void)
bool result = false;
#ifdef USE_USB_DETECT
result = IORead(usbDetectPin) != 0;
if (usbDetectPin) {
result = IORead(usbDetectPin) != 0;
}
#endif
return result;

View File

@ -95,8 +95,6 @@
#define CURRENT_METER_OFFSET_DEFAULT 0
#define USE_VCP
#define USE_USB_DETECT
//#define USB_DETECT_PIN PA9
#define USE_UART1
#define UART1_RX_PIN PA10