HPM SDK
HPMicro Software Development Kit
hpm_dp83867.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef HPM_DP83867_H
9 #define HPM_DP83867_H
10 
11 /*---------------------------------------------------------------------
12  * Includes
13  *---------------------------------------------------------------------
14  */
15 #include "hpm_enet_phy.h"
16 #include "hpm_common.h"
17 #include "hpm_enet_regs.h"
18 /*---------------------------------------------------------------------
19  * Macro Const Definitions
20  *---------------------------------------------------------------------
21  */
22 #ifndef DP83867_ADDR
23 #define DP83867_ADDR (0U)
24 #endif
25 
26 #define DP83867_ID1 (0x2000U)
27 #define DP83867_ID2 (0x28U)
28 
29 /*---------------------------------------------------------------------
30  * Typedef Struct Declarations
31  *---------------------------------------------------------------------
32  */
33 typedef struct {
34  bool loopback;
35  uint8_t speed;
37  uint8_t duplex;
39 
40 typedef enum {
58 
59 #if defined(__cplusplus)
60 extern "C" {
61 #endif /* __cplusplus */
62 /*---------------------------------------------------------------------
63  * Exported Functions
64  *---------------------------------------------------------------------
65  */
66 void dp83867_reset(ENET_Type *ptr);
71 
72 #if defined(__cplusplus)
73 }
74 #endif /* __cplusplus */
75 #endif /* HPM_DP83867_H */
void dp83867_basic_mode_default_config(ENET_Type *ptr, dp83867_config_t *config)
Definition: hpm_dp83867.c:80
void dp83867_set_mdi_crossover_mode(ENET_Type *ptr, enet_phy_crossover_mode_t mode)
Definition: hpm_dp83867.c:132
void dp83867_reset(ENET_Type *ptr)
Definition: hpm_dp83867.c:67
bool dp83867_basic_mode_init(ENET_Type *ptr, dp83867_config_t *config)
Definition: hpm_dp83867.c:94
dp83867_rgmii_rx_delay_t
Definition: hpm_dp83867.h:40
@ DP83867_RX_DELAY_2P50_NS
Definition: hpm_dp83867.h:50
@ DP83867_RX_DELAY_2P25_NS
Definition: hpm_dp83867.h:49
@ DP83867_RX_DELAY_3P50_NS
Definition: hpm_dp83867.h:54
@ DP83867_RX_DELAY_1P25_NS
Definition: hpm_dp83867.h:45
@ DP83867_RX_DELAY_1P50_NS
Definition: hpm_dp83867.h:46
@ DP83867_RX_DELAY_2P00_NS
Definition: hpm_dp83867.h:48
@ DP83867_RX_DELAY_3P00_NS
Definition: hpm_dp83867.h:52
@ DP83867_RX_DELAY_1P75_NS
Definition: hpm_dp83867.h:47
@ DP83867_RX_DELAY_0P25_NS
Definition: hpm_dp83867.h:41
@ DP83867_RX_DELAY_3P25_NS
Definition: hpm_dp83867.h:53
@ DP83867_RX_DELAY_0P75_NS
Definition: hpm_dp83867.h:43
@ DP83867_RX_DELAY_4P00_NS
Definition: hpm_dp83867.h:56
@ DP83867_RX_DELAY_1P00_NS
Definition: hpm_dp83867.h:44
@ DP83867_RX_DELAY_2P75_NS
Definition: hpm_dp83867.h:51
@ DP83867_RX_DELAY_3P75_NS
Definition: hpm_dp83867.h:55
@ DP83867_RX_DELAY_0P50_NS
Definition: hpm_dp83867.h:42
void dp83867_get_phy_status(ENET_Type *ptr, enet_phy_status_t *status)
Definition: hpm_dp83867.c:122
enet_phy_crossover_mode_t
Definition: hpm_enet_phy.h:28
Definition: hpm_enet_regs.h:12
Definition: hpm_dp83867.h:33
bool loopback
Definition: hpm_dp83867.h:34
uint8_t speed
Definition: hpm_dp83867.h:35
uint8_t duplex
Definition: hpm_dp83867.h:37
bool auto_negotiation
Definition: hpm_dp83867.h:36
Definition: hpm_enet_phy.h:34