mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Simplified Owner management
This commit is contained in:
parent
cf7e7f1dc3
commit
58105c25ac
59 changed files with 171 additions and 164 deletions
|
@ -36,7 +36,7 @@ static IO_t usbDetectPin = IO_NONE;
|
|||
void usbCableDetectDeinit(void)
|
||||
{
|
||||
#ifdef USB_DETECT_PIN
|
||||
IOInit(usbDetectPin, OWNER_FREE, RESOURCE_NONE, 0);
|
||||
IOInit(usbDetectPin, OWNER_FREE, 0);
|
||||
IOConfigGPIO(usbDetectPin, IOCFG_IN_FLOATING);
|
||||
usbDetectPin = IO_NONE;
|
||||
#endif
|
||||
|
@ -47,7 +47,7 @@ void usbCableDetectInit(void)
|
|||
#ifdef USB_DETECT_PIN
|
||||
usbDetectPin = IOGetByTag(IO_TAG(USB_DETECT_PIN));
|
||||
|
||||
IOInit(usbDetectPin, OWNER_USB, RESOURCE_INPUT, 0);
|
||||
IOInit(usbDetectPin, OWNER_USB_DETECT, 0);
|
||||
IOConfigGPIO(usbDetectPin, IOCFG_OUT_PP);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue