HPM SDK
HPMicro Software Development Kit
hpm_rtl8201.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_RTL8201_H
9 #define HPM_RTL8201_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 RTL8201_ADDR
23 #define RTL8201_ADDR (2U)
24 #endif
25 
26 #define RTL8201_ID1 (0x001CU)
27 #define RTL8201_ID2 (0x32U)
28 
29 /*---------------------------------------------------------------------
30  * Typedef Struct Declarations
31  *---------------------------------------------------------------------
32  */
33 typedef struct {
34  bool loopback;
35  uint8_t speed;
37  uint8_t duplex;
38  bool txc_input;
40 
41 #if defined(__cplusplus)
42 extern "C" {
43 #endif /* __cplusplus */
44 /*---------------------------------------------------------------------
45  * Exported Functions
46  *---------------------------------------------------------------------
47  */
48 void rtl8201_reset(ENET_Type *ptr);
52 
53 #if defined(__cplusplus)
54 }
55 #endif /* __cplusplus */
56 #endif /* HPM_RTL8201_H */
void rtl8201_reset(ENET_Type *ptr)
Definition: hpm_rtl8201.c:38
void rtl8201_get_phy_status(ENET_Type *ptr, enet_phy_status_t *status)
Definition: hpm_rtl8201.c:102
void rtl8201_basic_mode_default_config(ENET_Type *ptr, rtl8201_config_t *config)
Definition: hpm_rtl8201.c:51
bool rtl8201_basic_mode_init(ENET_Type *ptr, rtl8201_config_t *config)
Definition: hpm_rtl8201.c:66
Definition: hpm_enet_regs.h:12
Definition: hpm_enet_phy.h:34
Definition: hpm_rtl8201.h:33
uint8_t speed
Definition: hpm_rtl8201.h:35
bool loopback
Definition: hpm_rtl8201.h:34
uint8_t duplex
Definition: hpm_rtl8201.h:37
bool auto_negotiation
Definition: hpm_rtl8201.h:36
bool txc_input
Definition: hpm_rtl8201.h:38