USB Device

USB Device Overview

A USB (Universal Serial Bus) device is a hardware component that connects to a host (e.g., a computer or microcontroller) via the USB interface. It enables data transfer and power delivery between the host and the device. USB is widely used for peripherals like keyboards, mice, storage drives, cameras, and more.

Usage

  1. All API functions have the first argument as the handle followed by data to the pointer.

  2. To initialize the usb device using rs call

  3. Transmit and receive data from the usb device using rs calls.

  4. Return codes of API functions are defined in header file.

Application Interface

USB device calls

Function

Description

rs_usbd_init

To open the usb device

rs_usbd_packet_received

To receive packet for the usb device

rs_usbd_transmit

To transmit the data to the usb device

Using these ‘rs’ calls to initialize usb device.

Error Code

  • Every API’s for the usb device and returns some success or failure values. Please refer below section,

USB device Header Details

Documentation from the relevant header as follows:

Warning

doxygenfile: Cannot find file “rs_usbd.h