AM64x MCU+ SDK  08.03.00
hsrPrp_red.h
Go to the documentation of this file.
1 
61 #ifndef RED_H_
62 #define RED_H_
63 
64 #ifdef __cplusplus
65 extern "C"
66 {
67 #endif
68 
69 
70 /* ========================================================================== */
71 /* Include Files */
72 /* ========================================================================== */
73 
74 #include "hsrPrp_firmwareOffsets.h"
75 #include "hsrPrp_red_common.h"
76 #include "hsrPrp_handle.h"
77 #ifdef ICSS_PROTOCOL_PRP
78 #include "hsrPrp_red_prp.h"
79 #endif /* ICSS_PROTOCOL_PRP */
80 #ifdef ICSS_PROTOCOL_HSR
81 #include "hsrPrp_red_hsr.h"
82 #endif /* ICSS_PROTOCOL_HSR */
83 
84 #include <kernel/dpl/ClockP.h>
85 #include <kernel/dpl/TaskP.h>
86 
87 
88 /* ========================================================================== */
89 /* Macros & Typedefs */
90 /* ========================================================================== */
91 
92 #define RED_MANUFACTURER "Texas Instruments"
93 #define RED_VERSION_NAME "1.0.4.0553"
94 #define RED_NODE_NAME "TI"
95 
96 
97 #ifdef ICSS_PROTOCOL_PRP
98 #define RED_TAG_SIZE PRP_RCT_SIZE
99 #define RED_LAN_A_MAGIC PRP_LAN_A_MAGIC
100 #define RED_LAN_B_MAGIC PRP_LAN_B_MAGIC
101 #endif /* ICSS_PROTOCOL_PRP */
102 
103 #ifdef ICSS_PROTOCOL_HSR
104 #define RED_TAG_SIZE HSR_TAG_SIZE
105 #define RED_LAN_A_MAGIC HSR_LAN_A_MAGIC
106 #define RED_LAN_B_MAGIC HSR_LAN_B_MAGIC
107 #endif /* ICSS_PROTOCOL_HSR */
108 
109 //Note the count take in account CRC
110 #define RED_RX_FRAME_BYTE_CNT_MIN ( 64 )
111 #define RED_RX_FRAME_BYTE_CNT_MAX ( 1528 )
113 /*VLAN*/
114 #define VLAN_TAG_TPID_BIG_ENDIAN ( 0x0081 )
115 #define VLAN_TAG_SIZE ( 4 )
116 
117 /* ========================================================================== */
118 /* Function Declarations */
119 /* ========================================================================== */
127 void RedProtocolInit(void);
133 void RedNodeTableClear(hsrPrpHandle *hsrPrphandle);
141 void RedIncrementCounter(uint32_t offset, PRUICSS_Handle pruicssHandle);
150 void RedSupFrameUpdateTlv(hsrPrpHandle *hsrPrphandle, uint8_t type);
161 int32_t RedTxPacket(void *icssEmachandle, ICSS_EMAC_TxArgument *txArg, void *userArg);
172 int32_t RedRxPktGet(void *icssEmachandle, ICSS_EMAC_RxArgument *rxVoidArg, void *userArg);
180  PRUICSS_Handle pruicssHandle);
186 
193  PRUICSS_Handle pruicssHandle);
209 void RedProtocolStop(hsrPrpHandle *hsrPrphandle,
210  PRUICSS_Handle pruicssHandle);
211 
219 #ifdef __cplusplus
220 }
221 #endif
222 
223 #endif /* RED_H_ */
RedProtocolInit
void RedProtocolInit(void)
Assigns key function pointers based on macro.
RedProtocolStart
RED_STATUS RedProtocolStart(hsrPrpHandle *hsrPrphandle, PRUICSS_Handle pruicssHandle)
Function to start RedProtocolStart.
RedProtocolStop
void RedProtocolStop(hsrPrpHandle *hsrPrphandle, PRUICSS_Handle pruicssHandle)
Delete Node Table check Task.
ICSS_EMAC_TxArgument
Tx packet processing information block that needs to passed into call to ICSS_EMAC_TxPacket.
Definition: icss_emac.h:667
ICSS_EMAC_RxArgument
Rx packet processing information block that needs to passed into call to ICSS_EMAC_RxPktGet.
Definition: icss_emac.h:649
RedLifeCheckTaskDelete
void RedLifeCheckTaskDelete(hsrPrpHandle *hsrPrphandle)
Function to delete RED Supervision task.
type
uint16_t type
Definition: tisci_rm_core.h:1
RedLifeCheckTaskCreate
RED_STATUS RedLifeCheckTaskCreate(hsrPrpHandle *hsrPrphandle, PRUICSS_Handle pruicssHandle)
Function to create RED Supervision task.
RedNodeTableClear
void RedNodeTableClear(hsrPrpHandle *hsrPrphandle)
Sets Clear Node Table flag to be used by PRU.
ClockP.h
hsrPrpHandle
struct hsrPrp_Config_s hsrPrpHandle
Definition: hsrPrp_handle.h:92
RedIncrementCounter
void RedIncrementCounter(uint32_t offset, PRUICSS_Handle pruicssHandle)
Increments statistics counter.
hsrPrp_red_common.h
Commonly used Macros, structures and Offsets.
RED_STATUS
RED_STATUS
RED Status.
Definition: hsrPrp_red_common.h:530
TaskP.h
hsrPrp_handle.h
Include file for hsrPrp_red_hsr.c.
hsrPrp_red_hsr.h
Include file for hsrPrp_red_hsr.c.
RedRxPktGet
int32_t RedRxPktGet(void *icssEmachandle, ICSS_EMAC_RxArgument *rxVoidArg, void *userArg)
Copies data from L3 receive queues.
RedTxPacket
int32_t RedTxPacket(void *icssEmachandle, ICSS_EMAC_TxArgument *txArg, void *userArg)
Enqueues redundancy frames to transmit.
RedProtocolConfigure
void RedProtocolConfigure(PRUICSS_Handle pruicssHandle)
Configure IEP to modify max frame size (to acccount for LRE header)
PRUICSS_Handle
struct PRUICSS_Config_s * PRUICSS_Handle
A handle that is returned from a PRUICSS_open() call. This handle is required for calling other APIs.
Definition: pruicss/g_v0/pruicss.h:234
RedSupFrameUpdateTlv
void RedSupFrameUpdateTlv(hsrPrpHandle *hsrPrphandle, uint8_t type)
hsrPrp_red_prp.h
Include file for hsrPrp_red_prp.c.