AM263x MCU+ SDK  11.00.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_per.h>
50 #include <include/mod/mod_null.h>
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /* ========================================================================== */
57 /* Macros */
58 /* ========================================================================== */
59 
61 #define ENET_NULLPER_FEAT1 (ENET_BIT(0U))
62 
64 #define ENET_NULLPER_FEAT2 (ENET_BIT(1U))
65 
67 #define ENET_NULLPER_ERRATA1 (ENET_BIT(0U))
68 
70 #define ENET_NULLPER_CLK_MCLK (1U)
71 
72 /* ========================================================================== */
73 /* Structures and Enums */
74 /* ========================================================================== */
75 
79 typedef struct NullPer_Cfg_s
80 {
83 
86 
88  uint32_t dummy;
89 } NullPer_Cfg;
90 
94 typedef struct NullPer_Obj_s
95 {
98 
101 
104 } NullPer_Obj;
105 
109 typedef struct NullPer_Obj_s *NullPer_Handle;
110 
111 /* ========================================================================== */
112 /* Global Variables Declarations */
113 /* ========================================================================== */
114 
115 /* None */
116 
117 /* ========================================================================== */
118 /* Function Declarations */
119 /* ========================================================================== */
120 
132  Enet_Type enetType,
133  void *cfg,
134  uint32_t cfgSize);
135 
151  Enet_Type enetType,
152  uint32_t instId,
153  const void *cfg,
154  uint32_t cfgSize);
155 
169  Enet_Type enetType,
170  uint32_t instId);
171 
184  uint32_t cmd,
185  Enet_IoctlPrms *prms);
186 
196  uint32_t evtMask);
197 
206 
215 
216 /* ========================================================================== */
217 /* Deprecated Function Declarations */
218 /* ========================================================================== */
219 
220 /* None */
221 
222 #ifdef __cplusplus
223 }
224 #endif
225 
226 #endif /* PER_NULL_H_ */
NullPer_Obj::mod2
NullMod_Obj mod2
Definition: per_null.h:103
NullPer_Cfg::mod1Cfg
NullMod_Cfg mod1Cfg
Definition: per_null.h:82
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:80
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:97
NullPer_Cfg::mod2Cfg
NullMod_Cfg mod2Cfg
Definition: per_null.h:85
Enet_IoctlPrms
Enet IOCTL param.
Definition: enet_ioctl.h:282
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:87
EnetPer_Obj
Ethernet Peripheral object.
Definition: enet_per.h:568
NullPer_Obj::mod1
NullMod_Obj mod1
Definition: per_null.h:100
NullMod_Cfg
Null Module configuration parameters.
Definition: mod_null.h:78
NullPer_Obj
Null Peripheral object.
Definition: per_null.h:95
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:380
Enet_Type
Enet_Type
Ethernet peripheral type.
Definition: enet_types.h:202
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:109
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:88