HPM SDK
HPMicro Software Development Kit
hpm_jl1111.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (c) 2024-2025 HPMicro
11  *
12  * SPDX-License-Identifier: BSD-3-Clause
13  *
14  */
15 
16 #ifndef HPM_JL1111_H
17 #define HPM_JL1111_H
18 
19 /*---------------------------------------------------------------------
20  * Includes
21  *---------------------------------------------------------------------
22  */
23 #include "hpm_tsw_phy.h"
24 #include "hpm_common.h"
25 #include "hpm_tsw_regs.h"
26 /*---------------------------------------------------------------------
27  * Macro Const Definitions
28  *---------------------------------------------------------------------
29  */
30 #ifndef JL1111_ADDR
34 #define JL1111_ADDR (0U)
35 #endif
36 
40 #define JL1111_ID1 (0x937CU)
44 #define JL1111_ID2 (0x10U)
45 
46 /*---------------------------------------------------------------------
47  * Typedef Struct Declarations
48  *---------------------------------------------------------------------
49  */
53 typedef struct {
54  bool loopback;
55  uint8_t speed;
56  bool auto_negotiation;
57  uint8_t duplex;
59 
60 #if defined(__cplusplus)
61 extern "C" {
62 #endif /* __cplusplus */
63 /*---------------------------------------------------------------------
64  * Exported Functions
65  *---------------------------------------------------------------------
66  */
73 void jl1111_reset(TSW_Type *ptr, uint8_t port);
74 
86 
99 bool jl1111_basic_mode_init(TSW_Type *ptr, uint8_t port, jl1111_config_t *config);
100 
111 void jl1111_get_phy_status(TSW_Type *ptr, uint8_t port, tsw_phy_status_t *status);
112 
113 #if defined(__cplusplus)
114 }
115 #endif /* __cplusplus */
116 #endif /* HPM_JL1111_H */
void jl1111_basic_mode_default_config(ENET_Type *ptr, jl1111_config_t *config)
Set default configuration for JL1111 PHY basic mode.
Definition: hpm_jl1111.c:54
bool jl1111_reset(ENET_Type *ptr, uint32_t phy_addr)
Reset JL1111 PHY chip.
Definition: hpm_jl1111.c:38
void jl1111_get_phy_status(ENET_Type *ptr, uint32_t phy_addr, enet_phy_status_t *status)
Get JL1111 PHY status.
Definition: hpm_jl1111.c:107
bool jl1111_basic_mode_init(ENET_Type *ptr, uint32_t phy_addr, jl1111_config_t *config)
Initialize JL1111 PHY chip in basic mode.
Definition: hpm_jl1111.c:68
Definition: hpm_tsw_regs.h:12
JL1111 PHY configuration structure.
Definition: hpm_jl1111.h:71
Definition: hpm_tsw_phy.h:34