Zephyr Project API
3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
eth_nxp_enet.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DRIVERS_ETH_NXP_ENET_H__
8
#define ZEPHYR_INCLUDE_DRIVERS_ETH_NXP_ENET_H__
9
10
/*
11
* This header is for NXP ENET driver development
12
* and has definitions for internal implementations
13
* not to be used by application
14
*/
15
16
#include <
zephyr/device.h
>
17
#include <
zephyr/kernel.h
>
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
23
/*
24
* Reasons for callback to a driver:
25
*
26
* Module reset: The ENET module was reset, perhaps because of power management
27
* actions, and subdriver should reinitialize part of the module.
28
* Interrupt: An interrupt of a type relevant to the subdriver occurred.
29
* Interrupt enable: The driver's relevant interrupt was enabled in NVIC
30
*/
31
enum
nxp_enet_callback_reason
{
32
NXP_ENET_MODULE_RESET
,
33
NXP_ENET_INTERRUPT
,
34
NXP_ENET_INTERRUPT_ENABLED
,
35
};
36
37
enum
nxp_enet_driver
{
38
NXP_ENET_MAC
,
39
NXP_ENET_MDIO
,
40
NXP_ENET_PTP_CLOCK
,
41
};
42
43
extern
void
nxp_enet_mdio_callback
(
const
struct
device
*mdio_dev,
44
enum
nxp_enet_callback_reason
event,
45
void
*
data
);
46
47
#ifdef CONFIG_PTP_CLOCK_NXP_ENET
48
extern
void
nxp_enet_ptp_clock_callback
(
const
struct
device
*dev,
49
enum
nxp_enet_callback_reason
event,
50
void
*
data
);
51
#else
52
#define nxp_enet_ptp_clock_callback(...)
53
#endif
54
55
/*
56
* Internal implementation, inter-driver communication function
57
*
58
* dev: target device to call back
59
* dev_type: which driver to call back
60
* event: reason/cause of callback
61
* data: opaque data, will be interpreted based on reason and target driver
62
*/
63
extern
void
nxp_enet_driver_cb
(
const
struct
device
*dev,
64
enum
nxp_enet_driver
dev_type,
65
enum
nxp_enet_callback_reason
event,
66
void
*
data
);
67
68
#ifdef __cplusplus
69
}
70
#endif
71
72
73
#endif
/* ZEPHYR_INCLUDE_DRIVERS_ETH_NXP_ENET_H__ */
device.h
nxp_enet_mdio_callback
void nxp_enet_mdio_callback(const struct device *mdio_dev, enum nxp_enet_callback_reason event, void *data)
nxp_enet_callback_reason
nxp_enet_callback_reason
Definition
eth_nxp_enet.h:31
NXP_ENET_MODULE_RESET
@ NXP_ENET_MODULE_RESET
Definition
eth_nxp_enet.h:32
NXP_ENET_INTERRUPT
@ NXP_ENET_INTERRUPT
Definition
eth_nxp_enet.h:33
NXP_ENET_INTERRUPT_ENABLED
@ NXP_ENET_INTERRUPT_ENABLED
Definition
eth_nxp_enet.h:34
nxp_enet_driver_cb
void nxp_enet_driver_cb(const struct device *dev, enum nxp_enet_driver dev_type, enum nxp_enet_callback_reason event, void *data)
nxp_enet_ptp_clock_callback
#define nxp_enet_ptp_clock_callback(...)
Definition
eth_nxp_enet.h:52
nxp_enet_driver
nxp_enet_driver
Definition
eth_nxp_enet.h:37
NXP_ENET_PTP_CLOCK
@ NXP_ENET_PTP_CLOCK
Definition
eth_nxp_enet.h:40
NXP_ENET_MDIO
@ NXP_ENET_MDIO
Definition
eth_nxp_enet.h:39
NXP_ENET_MAC
@ NXP_ENET_MAC
Definition
eth_nxp_enet.h:38
kernel.h
Public kernel APIs.
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:403
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
include
zephyr
drivers
ethernet
eth_nxp_enet.h
Generated on Sun Sep 15 2024 17:01:29 for Zephyr Project API by
1.9.8