1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 // This file contains definitions for the USB Peripheral Test driver.
8 // The driver implements three endpoints: bulk out, bulk in and interrupt.
9 // The driver supports:
10 //
11 // 1. Writing data to the device with USB control request.
12 //
13 // 2. Reading data back from the device with USB control request.
14 //
15 // 3. Requesting the device to send an interrupt packet containing the data
16 //    sent via USB control request.
17 //
18 // 4. Looping back data via the two bulk endpoints.
19 
20 // USB control request to write data to the device.
21 #define USB_PERIPHERAL_TEST_SET_DATA 1
22 
23 // USB control request to read badk data set by USB_PERIPHERAL_TEST_SET_DATA.
24 #define USB_PERIPHERAL_TEST_GET_DATA 2
25 
26 // USB control request to request the device to send an interrupt request
27 // containing the data set via USB_PERIPHERAL_TEST_SET_DATA.
28 #define USB_PERIPHERAL_TEST_SEND_INTERUPT 3
29 
30