blob: fedfe128b22d5a457b28b9d3c258483177f5aee4 [file] [log] [blame]
// 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;
type PrebuiltType = strict enum : 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;
};
@for_deprecated_c_bindings
protocol Device {
/// Loads the prebuilt firmware onto the USB test device, and renumerates as the new device.
LoadPrebuiltFirmware(struct {
prebuilt_type PrebuiltType;
}) -> (struct {
s zx.status;
});
/// Loads the firmware onto the USB test device, and renumerates as the new device.
LoadFirmware(resource struct {
firmware fuchsia.mem.Buffer;
}) -> (struct {
s zx.status;
});
};