AM64x MCU+ SDK  10.01.00
dp83822.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 DP83822_H_
50 #define DP83822_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 struct Dp83822_Cfg_s
79 {
80  /* No extended config parameters at the moment */
81 } Dp83822_Cfg;
82 
83 /* ========================================================================== */
84 /* Global Variables Declarations */
85 /* ========================================================================== */
86 
87 /* None */
88 
89 /* ========================================================================== */
90 /* Function Declarations */
91 /* ========================================================================== */
92 
101 
103  uint8_t phyAddr,
104  Phy_RegAccessCb_t* pRegAccessCb);
105 
107  const void *pVersion);
108 
110  Phy_Mii mii);
111 
113  const void *pExtCfg,
114  const uint32_t extCfgSize,
115  Phy_Mii mii,
116  bool loopbackEn);
117 
119 
121 
123 /* ========================================================================== */
124 /* Deprecated Function Declarations */
125 /* ========================================================================== */
126 
127 /* None */
128 
129 /* ========================================================================== */
130 /* Static Function Definitions */
131 /* ========================================================================== */
132 
133 /* None */
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* DP83822_H_ */
140 
Dp83822_initCfg
void Dp83822_initCfg(Dp83822_Cfg *cfg)
Initialize DP83822 PHY specific config params.
Dp83822_isResetComplete
bool Dp83822_isResetComplete(EthPhyDrv_Handle hPhy)
Dp83822_Cfg
DP83822 PHY configuration parameters.
Definition: dp83822.h:79
Dp83822_bind
void Dp83822_bind(EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb)
Phy_RegAccessCb_t
Definition: phy_common.h:217
Dp83822_isMacModeSupported
bool Dp83822_isMacModeSupported(EthPhyDrv_Handle hPhy, Phy_Mii mii)
Dp83822_reset
void Dp83822_reset(EthPhyDrv_Handle hPhy)
EthPhyDrv_Handle
uint8_t EthPhyDrv_Handle[ETHPHYDRV_MAX_OBJ_SIZE]
Definition: phy_common.h:236
Phy_Mii
Phy_Mii
Definition: phy_common.h:196
Dp83822_config
int32_t Dp83822_config(EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn)
phy_common.h
Dp83822_printRegs
void Dp83822_printRegs(EthPhyDrv_Handle hPhy)
Dp83822_isPhyDevSupported
bool Dp83822_isPhyDevSupported(EthPhyDrv_Handle hPhy, const void *pVersion)