AM64x MCU+ SDK  12.01.00
dp83826.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
49 #ifndef dp83826_H_
50 #define dp83826_H_
51 
52 /* ========================================================================== */
53 /* Include Files */
54 /* ========================================================================== */
55 
56 #include <stdint.h>
57 
58 #include "phy_common.h"
59 #include "port.h"
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 /* ========================================================================== */
66 /* Macros */
67 /* ========================================================================== */
68 
69 /* None */
70 
71 /* ========================================================================== */
72 /* Structures and Enums */
73 /* ========================================================================== */
74 
78 typedef enum Dp83826_LedMode_e
79 {
82 
85 
88 
91 
94 
97 
100 
103 
106 
109 
112 
115 
118 
121 
125 
129 typedef struct Dp83826_Cfg_s
130 {
131  /* No extended config parameters at the moment */
132 } Dp83826_Cfg;
133 
134 /* ========================================================================== */
135 /* Global Variables Declarations */
136 /* ========================================================================== */
137 
138 /* None */
139 
140 /* ========================================================================== */
141 /* Function Declarations */
142 /* ========================================================================== */
143 
152 
154  uint8_t phyAddr,
155  Phy_RegAccessCb_t* pRegAccessCb);
156 
158  const void *pVersion);
159 
161  Phy_Mii mii);
162 
164  const void *pExtCfg,
165  const uint32_t extCfgSize,
166  Phy_Mii mii,
167  bool loopbackEn);
168 
170 
171 /* ========================================================================== */
172 /* Deprecated Function Declarations */
173 /* ========================================================================== */
174 
175 /* None */
176 
177 /* ========================================================================== */
178 /* Static Function Definitions */
179 /* ========================================================================== */
180 
181 /* None */
182 
183 #ifdef __cplusplus
184 }
185 #endif
186 
187 #endif /* dp83826_H_ */
188 
DP83826_LED_LPI_MODE
@ DP83826_LED_LPI_MODE
Definition: dp83826.h:114
Phy_RegAccessCb_t
Definition: phy_common.h:305
DP83826_LED_RXACT
@ DP83826_LED_RXACT
Definition: dp83826.h:90
EthPhyDrv_Handle
uint8_t EthPhyDrv_Handle[ETHPHYDRV_MAX_OBJ_SIZE]
Definition: phy_common.h:327
Dp83826_isPhyDevSupported
bool Dp83826_isPhyDevSupported(EthPhyDrv_Handle hPhy, const void *pVersion)
DP83826_LED_SPEED_10BTX
@ DP83826_LED_SPEED_10BTX
Definition: dp83826.h:99
Dp83826_isMacModeSupported
bool Dp83826_isMacModeSupported(EthPhyDrv_Handle hPhy, Phy_Mii mii)
Phy_Mii
Phy_Mii
Definition: phy_common.h:230
Dp83826_bind
void Dp83826_bind(EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb)
DP83826_LED_100BTFD
@ DP83826_LED_100BTFD
Definition: dp83826.h:111
DP83826_LED_PRBS_ERROR
@ DP83826_LED_PRBS_ERROR
Definition: dp83826.h:123
DP83826_LED_TXACT
@ DP83826_LED_TXACT
Definition: dp83826.h:87
DP83826_LED_RXTXACT
@ DP83826_LED_RXTXACT
Definition: dp83826.h:84
DP83826_LED_SPEED_100BTX
@ DP83826_LED_SPEED_100BTX
Definition: dp83826.h:96
DP83826_LED_BLINK_ACT
@ DP83826_LED_BLINK_ACT
Definition: dp83826.h:105
Dp83826_LedMode
Dp83826_LedMode
LED modes (sources).
Definition: dp83826.h:79
DP83826_LED_STRETCH_ACT
@ DP83826_LED_STRETCH_ACT
Definition: dp83826.h:108
DP83826_LED_FULL_DUPLEX
@ DP83826_LED_FULL_DUPLEX
Definition: dp83826.h:102
Dp83826_printRegs
void Dp83826_printRegs(EthPhyDrv_Handle hPhy)
DP83826_LED_RXTXERR
@ DP83826_LED_RXTXERR
Definition: dp83826.h:117
Dp83826_Cfg
dp83826 PHY configuration parameters.
Definition: dp83826.h:130
phy_common.h
Dp83826_initCfg
void Dp83826_initCfg(Dp83826_Cfg *cfg)
Initialize dp83826 PHY specific config params.
DP83826_LED_LINK_OK
@ DP83826_LED_LINK_OK
Definition: dp83826.h:81
Dp83826_config
int32_t Dp83826_config(EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn)
DP83826_LED_LINK_LOSS
@ DP83826_LED_LINK_LOSS
Definition: dp83826.h:120
DP83826_LED_COLLISION
@ DP83826_LED_COLLISION
Definition: dp83826.h:93