Zephyr API 3.6.99
Loading...
Searching...
No Matches
eth_adin2111.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 PHOENIX CONTACT Electronics GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_ETH_ADIN2111_H__
8#define ZEPHYR_INCLUDE_DRIVERS_ETH_ADIN2111_H__
9
10#include <stdint.h>
11#include <zephyr/kernel.h>
12#include <zephyr/device.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
30int eth_adin2111_lock(const struct device *dev, k_timeout_t timeout);
31
41int eth_adin2111_unlock(const struct device *dev);
42
56int eth_adin2111_reg_write(const struct device *dev, const uint16_t reg, uint32_t val);
57
71int eth_adin2111_reg_read(const struct device *dev, const uint16_t reg, uint32_t *val);
72
87int eth_adin2111_reg_update(const struct device *dev, const uint16_t reg,
88 uint32_t mask, uint32_t data);
89
102int eth_adin2111_sw_reset(const struct device *dev, uint16_t delay);
103
116int eth_adin2111_mac_reset(const struct device *dev);
117
131int eth_adin2111_broadcast_filter(const struct device *dev, bool enable);
132
141struct net_if *eth_adin2111_get_iface(const struct device *dev, const uint16_t port_idx);
142
143#ifdef __cplusplus
144}
145#endif
146
147#endif /* ZEPHYR_INCLUDE_DRIVERS_ETH_ADIN2111_H__ */
int eth_adin2111_reg_read(const struct device *dev, const uint16_t reg, uint32_t *val)
Reads host MAC interface register over SPI.
int eth_adin2111_sw_reset(const struct device *dev, uint16_t delay)
Reset both the MAC and PHY.
int eth_adin2111_lock(const struct device *dev, k_timeout_t timeout)
Locks device access.
int eth_adin2111_unlock(const struct device *dev)
Unlocks device access.
struct net_if * eth_adin2111_get_iface(const struct device *dev, const uint16_t port_idx)
Get the port-related net_if reference.
int eth_adin2111_broadcast_filter(const struct device *dev, bool enable)
Enable/disable the forwarding (to host) of broadcast frames.
int eth_adin2111_reg_update(const struct device *dev, const uint16_t reg, uint32_t mask, uint32_t data)
Update host MAC interface register over SPI.
int eth_adin2111_reg_write(const struct device *dev, const uint16_t reg, uint32_t val)
Writes host MAC interface register over SPI.
int eth_adin2111_mac_reset(const struct device *dev)
Reset the MAC device.
Public kernel APIs.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:403
Kernel timeout type.
Definition sys_clock.h:65
Network Interface structure.
Definition net_if.h:680