| // 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") |
| protocol EthMacCallbacks { |
| ConfigPhy(struct { |
| mac array<uint8, MAC_ARRAY_LENGTH>; |
| }) -> (struct { |
| s zx.status; |
| }); |
| }; |
| |
| @transport("Banjo") |
| @banjo_layout("ddk-protocol") |
| protocol EthMac { |
| MdioRead(struct { |
| reg uint32; |
| }) -> (struct { |
| s zx.status; |
| val uint32; |
| }); |
| MdioWrite(struct { |
| reg uint32; |
| val uint32; |
| }) -> (struct { |
| s zx.status; |
| }); |
| RegisterCallbacks(resource struct { |
| cb client_end:EthMacCallbacks; |
| }) -> (struct { |
| s zx.status; |
| }); |
| }; |