---
name: "usb_gadget_connect"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_gadget_connect"
---

# usb\_gadget\_connect(9)

software-controlled connect to USB host

## NAME

usb\_gadget\_connect - software-controlled connect to USB host

## SYNOPSIS

**int usb\_gadget\_connect(struct usb\_gadget \*** *gadget***);**

## ARGUMENTS

*gadget*

the peripheral being connected

## DESCRIPTION

Enables the D+ (or potentially D-) pullup. The host will start enumerating this gadget when the pullup is active and a VBUS session is active (the link is powered). This pullup is always enabled unless **usb\_gadget\_disconnect** has been used to disable it.

Returns zero on success, else negative errno.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
