| // 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 ddk.protocol.ethernet.mac; |
| |
| using zx; |
| |
| const uint32 MAC_ARRAY_LENGTH = 6; |
| |
| [Layout = "ddk-callback"] |
| protocol EthMacCallbacks { |
| ConfigPhy(array<uint8>:MAC_ARRAY_LENGTH mac) -> (zx.status s); |
| }; |
| |
| [Layout = "ddk-protocol"] |
| protocol EthMac { |
| MdioRead(uint32 reg) -> (zx.status s, uint32 val); |
| MdioWrite(uint32 reg, uint32 val) -> (zx.status s); |
| RegisterCallbacks(EthMacCallbacks cb) -> (zx.status s); |
| }; |