PDK API Guide for AM65xx
dp83867.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 DP83867_H_
50 #define DP83867_H_
51 
52 /* ========================================================================== */
53 /* Include Files */
54 /* ========================================================================== */
55 
56 #include <stdint.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 /* ========================================================================== */
63 /* Macros */
64 /* ========================================================================== */
65 
67 #define DP83867_LED_NUM (4U)
68 
69 /* ========================================================================== */
70 /* Structures and Enums */
71 /* ========================================================================== */
72 
76 typedef enum Dp83867_Gpio0Mode_e
77 {
80 
83 
86 
89 
92 
95 
98 
101 
105 
109 typedef enum Dp83867_Gpio1Mode_e
110 {
113 
116 
119 
122 
125 
128 
131 
134 
138 
142 typedef enum Dp83867_LedMode_e
143 {
146 
149 
152 
155 
158 
161 
164 
167 
170 
173 
176 
179 
182 
186 
190 typedef struct Dp83867_Cfg_s
191 {
194 
197 
199  uint32_t txDelayInPs;
200 
202  uint32_t rxDelayInPs;
203 
205  uint8_t txFifoDepth;
206 
208  uint32_t idleCntThresh;
209 
213 
216 
219 
222 } Dp83867_Cfg;
223 
224 /* ========================================================================== */
225 /* Global Variables Declarations */
226 /* ========================================================================== */
227 
228 /* None */
229 
230 /* ========================================================================== */
231 /* Function Declarations */
232 /* ========================================================================== */
233 
241 void Dp83867_initCfg(Dp83867_Cfg *cfg);
242 
243 /* ========================================================================== */
244 /* Deprecated Function Declarations */
245 /* ========================================================================== */
246 
247 /* None */
248 
249 /* ========================================================================== */
250 /* Static Function Definitions */
251 /* ========================================================================== */
252 
253 /* None */
254 
255 #ifdef __cplusplus
256 }
257 #endif
258 
259 #endif /* DP83867_H_ */
260 
bool rxClkShiftEn
Definition: dp83867.h:196
Definition: dp83867.h:151
Definition: dp83867.h:172
uint8_t txFifoDepth
Definition: dp83867.h:205
Definition: dp83867.h:100
Definition: dp83867.h:124
Definition: dp83867.h:166
Definition: dp83867.h:175
Definition: dp83867.h:184
uint32_t rxDelayInPs
Definition: dp83867.h:202
Definition: dp83867.h:145
Definition: dp83867.h:82
uint32_t txDelayInPs
Definition: dp83867.h:199
Definition: dp83867.h:121
Definition: dp83867.h:94
Definition: dp83867.h:79
Definition: dp83867.h:178
void Dp83867_initCfg(Dp83867_Cfg *cfg)
Initialize DP83867 PHY specific config params.
Definition: dp83867.h:157
Definition: dp83867.h:97
Dp83867_Gpio1Mode gpio1Mode
Definition: dp83867.h:218
Definition: dp83867.h:160
Definition: dp83867.h:130
bool txClkShiftEn
Definition: dp83867.h:193
Definition: dp83867.h:154
uint32_t idleCntThresh
Definition: dp83867.h:208
#define DP83867_LED_NUM
Number of LEDs available in the PHY.
Definition: dp83867.h:67
Definition: dp83867.h:91
Dp83867_Gpio1Mode
GPIO_1 mux modes.
Definition: dp83867.h:109
Definition: dp83867.h:163
Definition: dp83867.h:112
Definition: dp83867.h:88
Definition: dp83867.h:148
Definition: dp83867.h:118
Dp83867_LedMode
LED modes (sources).
Definition: dp83867.h:142
Definition: dp83867.h:169
Definition: dp83867.h:133
Definition: dp83867.h:181
Dp83867_Gpio0Mode
GPIO_0 mux modes.
Definition: dp83867.h:76
Definition: dp83867.h:103
Definition: dp83867.h:136
uint32_t impedanceInMilliOhms
Definition: dp83867.h:212
Definition: dp83867.h:115
DP83867 PHY configuration parameters.
Definition: dp83867.h:190
Definition: dp83867.h:127
Dp83867_Gpio0Mode gpio0Mode
Definition: dp83867.h:215
Definition: dp83867.h:85