mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Per mikeller's comment.
This commit is contained in:
parent
4adc5e0ed2
commit
0ae84bebb4
3 changed files with 5 additions and 8 deletions
|
@ -392,12 +392,9 @@ USB_OTG_STS USB_OTG_CoreInit(USB_OTG_CORE_HANDLE *pdev)
|
||||||
/* Deactivate the power down*/
|
/* Deactivate the power down*/
|
||||||
gccfg.d32 = 0;
|
gccfg.d32 = 0;
|
||||||
gccfg.b.pwdn = 1;
|
gccfg.b.pwdn = 1;
|
||||||
#ifdef VBUS_SENSING_ENABLED
|
|
||||||
gccfg.b.vbussensingA = 1 ;
|
// XXX Betaflight mod; disabled VBUS sensing features completely, including Sense A and B.
|
||||||
gccfg.b.vbussensingB = 1 ;
|
|
||||||
#else
|
|
||||||
gccfg.b.disablevbussensing = 1;
|
gccfg.b.disablevbussensing = 1;
|
||||||
#endif
|
|
||||||
|
|
||||||
if(pdev->cfg.Sof_output)
|
if(pdev->cfg.Sof_output)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,9 @@ bool usbCableIsInserted(void)
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
#ifdef USE_USB_DETECT
|
#ifdef USE_USB_DETECT
|
||||||
|
if (usbDetectPin) {
|
||||||
result = IORead(usbDetectPin) != 0;
|
result = IORead(usbDetectPin) != 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -95,8 +95,6 @@
|
||||||
#define CURRENT_METER_OFFSET_DEFAULT 0
|
#define CURRENT_METER_OFFSET_DEFAULT 0
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
#define USE_USB_DETECT
|
|
||||||
//#define USB_DETECT_PIN PA9
|
|
||||||
|
|
||||||
#define USE_UART1
|
#define USE_UART1
|
||||||
#define UART1_RX_PIN PA10
|
#define UART1_RX_PIN PA10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue