openusb_reset

OpenUSB Developers Guide
Prev |  | Next

# `openusb_reset`

## Name

`openusb_reset` -- Reset device

## Synopsis

``int32_t openusb_reset`(openusb_dev_handle_t dev);`

## Parameters

`dev` - Device handle.

## Description

`openusb_reset()` resets a device by resetting its port. The full reset of a device is not guaranteed.

## Return Value

`openusb_get_devid()` returns 0 on success. Otherwise, a openusb error is returned.

OPENUSB_SUCCESS No errors.

OPENUSB_UNKNOWN_DEVICE Device handle is not valid

OPENUSB_NOT_SUPPORTED Device reset is not supported.

OPENUSB_IO_* USB host controller errors

## See Also

Prev | Home | Next
`openusb_get_altsetting,openusb_set_altsetting` | Up | Device Descriptor Parsers