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
5library zircon.usb.test.fwloader;
6
7using fuchsia.mem;
8using zx;
9
10enum PrebuiltType : uint8 {
11    /// Test firmware that can be loaded onto the USB test device for running USB tests.
12    TESTER = 1;
13    /// Flash programmer used for loading a new bootloader onto the USB test device I2C EEPROM.
14    FLASH = 2;
15    /// Bootloader for the USB test device.
16    BOOT = 3;
17};
18
19[Layout = "Simple"]
20interface Device {
21    /// Loads the prebuilt firmware onto the USB test device, and renumerates as the new device.
22    1: LoadPrebuiltFirmware(PrebuiltType prebuilt_type) -> (zx.status s);
23
24    /// Loads the firmware onto the USB test device, and renumerates as the new device.
25    2: LoadFirmware(fuchsia.mem.Buffer firmware) -> (zx.status s);
26};
27