AM64x MCU+ SDK  08.02.00
per_null.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 
40 #ifndef PER_NULL_H_
41 #define PER_NULL_H_
42 
43 /* ========================================================================== */
44 /* Include Files */
45 /* ========================================================================== */
46 
47 #include <stdint.h>
49 #include <include/core/enet_mod.h>
50 #include <include/core/enet_per.h>
51 #include <include/mod/mod_null.h>
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 /* ========================================================================== */
58 /* Macros */
59 /* ========================================================================== */
60 
62 #define ENET_NULLPER_FEAT1 (ENET_BIT(0U))
63 
65 #define ENET_NULLPER_FEAT2 (ENET_BIT(1U))
66 
68 #define ENET_NULLPER_ERRATA1 (ENET_BIT(0U))
69 
71 #define ENET_NULLPER_CLK_MCLK (1U)
72 
73 /* ========================================================================== */
74 /* Structures and Enums */
75 /* ========================================================================== */
76 
80 typedef struct NullPer_Cfg_s
81 {
84 
87 
89  uint32_t dummy;
90 } NullPer_Cfg;
91 
95 typedef struct NullPer_Obj_s
96 {
99 
102 
105 } NullPer_Obj;
106 
110 typedef struct NullPer_Obj_s *NullPer_Handle;
111 
112 /* ========================================================================== */
113 /* Global Variables Declarations */
114 /* ========================================================================== */
115 
116 /* None */
117 
118 /* ========================================================================== */
119 /* Function Declarations */
120 /* ========================================================================== */
121 
133  Enet_Type enetType,
134  void *cfg,
135  uint32_t cfgSize);
136 
152  Enet_Type enetType,
153  uint32_t instId,
154  const void *cfg,
155  uint32_t cfgSize);
156 
170  Enet_Type enetType,
171  uint32_t instId);
172 
185  uint32_t cmd,
186  Enet_IoctlPrms *prms);
187 
197  uint32_t evtMask);
198 
207 
216 
217 /* ========================================================================== */
218 /* Deprecated Function Declarations */
219 /* ========================================================================== */
220 
221 /* None */
222 
223 #ifdef __cplusplus
224 }
225 #endif
226 
227 #endif /* PER_NULL_H_ */
NullPer_Obj::mod2
NullMod_Obj mod2
Definition: per_null.h:104
NullPer_Cfg::mod1Cfg
NullMod_Cfg mod1Cfg
Definition: per_null.h:83
NullPer_close
void NullPer_close(EnetPer_Handle hPer)
Close the Null Peripheral.
enet_types.h
This file contains the basic types using across the Enet driver.
NullPer_Cfg
Null Peripheral configuration parameters.
Definition: per_null.h:81
NullPer_open
int32_t NullPer_open(EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
Open and initialize the Null Peripheral.
NullPer_periodicTick
void NullPer_periodicTick(EnetPer_Handle hPer)
Run periodic tick on the Null Peripheral.
NullPer_rejoin
int32_t NullPer_rejoin(EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId)
Rejoin the Null Peripheral.
mod_null.h
This file contains the type definitions and helper macros for the "null" Ethernet Module interface.
NullPer_Obj::enetPer
EnetPer_Obj enetPer
Definition: per_null.h:98
NullPer_Cfg::mod2Cfg
NullMod_Cfg mod2Cfg
Definition: per_null.h:86
Enet_IoctlPrms
Enet IOCTL param.
Definition: enet_ioctl.h:233
NullPer_poll
void NullPer_poll(EnetPer_Handle hPer, uint32_t evtMask)
Poll for Ethernet events on the Null Peripheral.
NullMod_Obj
Null Module object.
Definition: mod_null.h:86
EnetPer_Obj
Ethernet Peripheral object.
Definition: enet_per.h:462
NullPer_Obj::mod1
NullMod_Obj mod1
Definition: per_null.h:101
NullMod_Cfg
Null Module configuration parameters.
Definition: mod_null.h:77
NullPer_Obj
Null Peripheral object.
Definition: per_null.h:96
enet_per.h
This file contains the type definitions and helper macros for the Enet Peripheral interface.
EnetPer_Handle
struct EnetPer_Obj_s * EnetPer_Handle
Ethernet Peripheral handle.
Definition: enet_per.h:299
Enet_Type
Enet_Type
Ethernet peripheral type.
Definition: enet_types.h:196
enet_mod.h
This file contains the type definitions and helper macros for the Enet Module interface.
NullPer_initCfg
void NullPer_initCfg(EnetPer_Handle hPer, Enet_Type enetType, void *cfg, uint32_t cfgSize)
Initialize Null peripheral's configuration parameters.
NullPer_Handle
struct NullPer_Obj_s * NullPer_Handle
Null Periperhal handle.
Definition: per_null.h:110
NullPer_ioctl
int32_t NullPer_ioctl(EnetPer_Handle hPer, uint32_t cmd, Enet_IoctlPrms *prms)
Issue an operation on the Null Peripheral.
NullPer_Cfg::dummy
uint32_t dummy
Definition: per_null.h:89