blob: a398bb318e746046abd1c1c00b7688bc70f01a2c [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.ethernet.mac;
using zx;
const MAC_ARRAY_LENGTH uint32 = 6;
@transport("Banjo")
@banjo_layout("ddk-callback")
closed protocol EthMacCallbacks {
strict ConfigPhy(struct {
mac array<uint8, MAC_ARRAY_LENGTH>;
}) -> (struct {
s zx.Status;
});
};
@transport("Banjo")
@banjo_layout("ddk-protocol")
closed protocol EthMac {
strict MdioRead(struct {
reg uint32;
}) -> (struct {
s zx.Status;
val uint32;
});
strict MdioWrite(struct {
reg uint32;
val uint32;
}) -> (struct {
s zx.Status;
});
strict RegisterCallbacks(resource struct {
cb client_end:EthMacCallbacks;
}) -> (struct {
s zx.Status;
});
};