|  | // Copyright 2018 The Fuchsia Authors. All rights reserved. | 
|  | // Use of this source code is governed by a BSD-style license that can be | 
|  | // found in the LICENSE file. | 
|  |  | 
|  | library fuchsia.hardware.usb.fwloader; | 
|  |  | 
|  | using fuchsia.mem; | 
|  | using zx; | 
|  |  | 
|  | enum PrebuiltType : uint8 { | 
|  | /// Test firmware that can be loaded onto the USB test device for running USB tests. | 
|  | TESTER = 1; | 
|  | /// Flash programmer used for loading a new bootloader onto the USB test device I2C EEPROM. | 
|  | FLASH = 2; | 
|  | /// Bootloader for the USB test device. | 
|  | BOOT = 3; | 
|  | }; | 
|  |  | 
|  | [ForDeprecatedCBindings] | 
|  | protocol Device { | 
|  | /// Loads the prebuilt firmware onto the USB test device, and renumerates as the new device. | 
|  | LoadPrebuiltFirmware(PrebuiltType prebuilt_type) -> (zx.status s); | 
|  |  | 
|  | /// Loads the firmware onto the USB test device, and renumerates as the new device. | 
|  | LoadFirmware(fuchsia.mem.Buffer firmware) -> (zx.status s); | 
|  | }; |