1 /* 2 * Copyright 2021-2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef CANEXCEL_IP_TYPES_H_ 8 #define CANEXCEL_IP_TYPES_H_ 9 10 /** 11 * @file CanEXCEL_Ip_Types.h 12 * 13 * @addtogroup CanEXCEL 14 * @{ 15 */ 16 17 #ifdef __cplusplus 18 extern "C"{ 19 #endif 20 /*================================================================================================== 21 * INCLUDE FILES 22 * 1) system and project includes 23 * 2) needed interfaces from external units 24 * 3) internal and external interfaces from this unit 25 ==================================================================================================*/ 26 #include "CanEXCEL_Ip_Cfg.h" 27 #include "CanEXCEL_Ip_DevReg.h" 28 29 /*================================================================================================== 30 * SOURCE FILE VERSION INFORMATION 31 ==================================================================================================*/ 32 #define CANEXCEL_IP_TYPES_VENDOR_ID_H 43 33 #define CANEXCEL_IP_TYPES_AR_RELEASE_MAJOR_VERSION_H 4 34 #define CANEXCEL_IP_TYPES_AR_RELEASE_MINOR_VERSION_H 7 35 #define CANEXCEL_IP_TYPES_AR_RELEASE_REVISION_VERSION_H 0 36 #define CANEXCEL_IP_TYPES_SW_MAJOR_VERSION_H 1 37 #define CANEXCEL_IP_TYPES_SW_MINOR_VERSION_H 0 38 #define CANEXCEL_IP_TYPES_SW_PATCH_VERSION_H 0 39 /*================================================================================================== 40 * FILE VERSION CHECKS 41 ==================================================================================================*/ 42 /* Check if current file and CanEXCEL_Ip_Cfg.h are of the same vendor */ 43 #if (CANEXCEL_IP_TYPES_VENDOR_ID_H != CANEXCEL_IP_CFG_VENDOR_ID_H) 44 #error "CanEXCEL_Ip_Types.h and CanEXCEL_Ip_Cfg.h have different vendor ids" 45 #endif 46 /* Check if current file and CanEXCEL_Ip_Cfg.h are of the same Autosar version */ 47 #if ((CANEXCEL_IP_TYPES_AR_RELEASE_MAJOR_VERSION_H != CANEXCEL_IP_CFG_AR_RELEASE_MAJOR_VERSION_H) || \ 48 (CANEXCEL_IP_TYPES_AR_RELEASE_MINOR_VERSION_H != CANEXCEL_IP_CFG_AR_RELEASE_MINOR_VERSION_H) || \ 49 (CANEXCEL_IP_TYPES_AR_RELEASE_REVISION_VERSION_H != CANEXCEL_IP_CFG_AR_RELEASE_REVISION_VERSION_H) \ 50 ) 51 #error "AutoSar Version Numbers of CanEXCEL_Ip_Types.h and CanEXCEL_Ip_Cfg.h are different" 52 #endif 53 /* Check if current file and CanEXCEL_Ip_Cfg.h are of the same Software version */ 54 #if ((CANEXCEL_IP_TYPES_SW_MAJOR_VERSION_H != CANEXCEL_IP_CFG_SW_MAJOR_VERSION_H) || \ 55 (CANEXCEL_IP_TYPES_SW_MINOR_VERSION_H != CANEXCEL_IP_CFG_SW_MINOR_VERSION_H) || \ 56 (CANEXCEL_IP_TYPES_SW_PATCH_VERSION_H != CANEXCEL_IP_CFG_SW_PATCH_VERSION_H) \ 57 ) 58 #error "Software Version Numbers of CanEXCEL_Ip_Types.h and CanEXCEL_Ip_Cfg.h are different" 59 #endif 60 /*================================================================================================== 61 * DEFINES AND MACROS 62 ==================================================================================================*/ 63 /**@brief This will enable Restricted Operation Mode */ 64 #define CANXL_IP_ROM_U32 ((uint32)0x00000001U) 65 /**@brief Tx SMB Error Response */ 66 #define CANXL_IP_TX_ERROR_RESPONSE_U32 ((uint32)0x00000002U) 67 /**@brief Define how controller recover from bus off state */ 68 #define CANXL_IP_BUSOFF_RECOVERY_U32 ((uint32)0x00000004U) 69 /**@brief Protocol Exception */ 70 #define CANXL_IP_PROTOCOL_EXCEPTION_U32 ((uint32)0x00000008U) 71 /**@brief Edge Filter Enable */ 72 #define CANXL_IP_EDGE_FILTER_U32 ((uint32)0x00000010U) 73 /**@brief CAN XL Error Response as protocol exception */ 74 #define CANXL_IP_XLER_U32 ((uint32)0x00000020U) 75 76 /** @brief CanEXCEL SubModules Instances Pointers Structure 77 * @details CanEXCEL Cotains base address pointers to the subModules from CanEXCEL 78 */ 79 /* implements CANEXCEL_StructType_structure */ 80 typedef struct { 81 CANXL_SIC_Type ** EXL_SIC; 82 MC_RGM_Type ** EXL_RGM; 83 CANXL_MRU_Type ** EXL_MRU; 84 CANXL_GRP_CONTROL_Type ** EXL_GRP; 85 CANXL_DSC_CONTROL_Type ** EXL_DESC_CTR; 86 CANXL_MSG_DESCRIPTORS_Type ** EXL_MSGD; 87 CANXL_RXFIFO_CONTROL_Type ** EXL_RXF_CNT; 88 CANXL_RXFIFO_Type ** EXL_RXFIFO; 89 CANXL_FILTER_BANK_Type ** EXL_FILTER; 90 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 91 CAN_TBS_Type ** EXL_TBS; 92 #endif 93 } CANEXCEL_StructType; 94 95 /** @brief CanEXCEL Message Buffer ID type 96 * @details CanEXCEL Id Type, Standard or Extended 97 */ 98 /* implements Canexcel_Ip_MsgBuffIdType_enum */ 99 typedef enum 100 { 101 CANEXCEL_MSG_ID_STD = 0, /**< Standard ID*/ 102 CANEXCEL_MSG_ID_EXT /**< Extended ID*/ 103 } Canexcel_Ip_MsgBuffIdType; 104 105 /** @brief CanEXCEL Message Format type 106 * @details CanEXCEL CAN Frame type, Classic, FastData(FD), and XL 107 */ 108 /* implements Canexcel_Ip_FrameType_enum */ 109 typedef enum 110 { 111 CANEXCEL_CLASIC_FRAME, 112 CANEXCEL_FD_FRAME, 113 CANEXCEL_XL_FRAME 114 } Canexcel_Ip_FrameType; 115 116 /** @brief The status of data coherency mechanism for semaphore-based access to device RAM. 117 * @details The descriptor control Status mechanism 118 */ 119 /* implements Canexcel_Ip_DesCntStatus_typedef */ 120 typedef enum 121 { 122 CANEXCEL_DESCNTSTATUS_UNLOCKED, /**< Descriptor is not locked. */ 123 CANEXCEL_DESCNTSTATUS_LOCKED_HW, /**< Descriptor is locked by CANEXCEL hardware. */ 124 CANEXCEL_DESCNTSTATUS_LOCKED_SYS, /**< Descriptor is locked by system host. */ 125 CANEXCEL_DESCNTSTATUS_INVALID /**< Invalid configuration, not possible. */ 126 } Canexcel_Ip_DesCntStatus; 127 128 /** @brief The status of descriptor state. 129 * @details The descriptor control Status mechanism 130 */ 131 /* implements Canexcel_Ip_DescState_typedef */ 132 typedef enum 133 { 134 CANEXCEL_DESC_STATE_INACTIVE, 135 CANEXCEL_DESC_STATE_EMPTY, 136 CANEXCEL_DESC_STATE_NOTFULL, 137 CANEXCEL_DESC_STATE_FULL, 138 CANEXCEL_DESC_STATE_OVERRUN 139 } Canexcel_Ip_DescState; 140 141 /** @brief Canexcel error interrupt types 142 */ 143 /* implements Canexcel_Ip_ErrorIntType_enum */ 144 typedef enum 145 { 146 CANEXCEL_IP_INT_RX_WARNING, /*!< RX warning interrupt*/ 147 CANEXCEL_IP_INT_TX_WARNING, /*!< TX warning interrupt*/ 148 CANEXCEL_IP_INT_ERR, /*!< Error interrupt*/ 149 CANEXCEL_IP_INT_ERR_FAST, /*!< Error Fast interrupt*/ 150 CANEXCEL_IP_INT_ERR_XL, /*!< Error XL interrupt*/ 151 CANEXCEL_IP_INT_ERR_INT, /*!< Error Internal interrupt*/ 152 CANEXCEL_IP_INT_BUSOFF, /*!< Bus off interrupt*/ 153 CANEXCEL_IP_INT_BUSOFF_DONE, /*!< Bus off done interrupt*/ 154 CANEXCEL_IP_INT_PASS_ERR, /*!< Passive error interrupt*/ 155 CANEXCEL_IP_INT_FREEZE, /*!< ACk Freeze event interrupt*/ 156 } Canexcel_Ip_ErrorIntType; 157 158 /** @brief Canexcel Timestamp Clock Sources 159 * This are define based on the resource file of each Chip support source selection */ 160 /* implements Canexcel_Ip_TimeBaseSelType_enum */ 161 typedef enum 162 { 163 CANTBS_TIMESURCE_BUS0, /*!< This is NETC Source */ 164 CANTBS_TIMESURCE_BUS1, /*!< This is GTM TBU0 Source */ 165 CANTBS_TIMESURCE_BUS2, /*!< This is GTM TBU1 Source */ 166 CANTBS_TIMESURCE_BUS3 /*!< This is CE_STM_0 Source */ 167 }Canexcel_Ip_TimeBaseSelType; 168 169 /** @brief Canexcel Timestamp Capture Point 170 */ 171 /* implements Canexcel_Ip_TimeStampCaptureType_enum */ 172 typedef enum 173 { 174 CANEXCEL_TIMESTAMPCAPTURE_DISABLE, /**< Time stamp capture disabled. */ 175 CANEXCEL_TIMESTAMPCAPTURE_END, /**< Time stamp is captured in the point the frame is considered valid. */ 176 CANEXCEL_TIMESTAMPCAPTURE_SOF, /**< The high resolution time stamp is captured in the start of the CAN frame */ 177 CANEXCEL_TIMESTAMPCAPTURE_START /**< The high resolution time stamp is captured in the start of frame for classical CAN frames and 178 in res bit for CAN FD frames and in the res XL bit for CAN XL frames */ 179 }Canexcel_Ip_TimeStampCaptureType; 180 181 /** @brief The status used and reported by Canexcel Ip driver. 182 * @details The CanEXCEL specific error codes 183 */ 184 /* implements Canexcel_Ip_StatusType_enum */ 185 typedef enum 186 { 187 CANEXCEL_STATUS_SUCCESS = E_OK, /**< Successfull Operation Completed */ 188 CANEXCEL_STATUS_ERROR = E_NOT_OK, /**< Error Operation Completed */ 189 CANEXCEL_STATUS_BUSY, /**< Busy Operation Completed */ 190 CANEXCEL_STATUS_TIMEOUT, /**< TimeOut Operation Completed */ 191 CANEXCEL_STATUS_BUFF_OUT_OF_RANGE, /**< The specified MB index is out of the configurable range */ 192 CANEXCEL_STATUS_NO_TRANSFER_IN_PROGRESS, /**< There is no transmission or reception in progress */ 193 } Canexcel_Ip_StatusType; 194 195 /*! @brief CANXL operation modes 196 */ 197 /* implements Canexcel_Ip_ModesType_typedef */ 198 typedef enum 199 { 200 CANEXCEL_NORMAL_MODE, /**< Normal mode or user mode @internal gui name="Normal" */ 201 CANEXCEL_LISTEN_ONLY_MODE, /**< Listen-only mode @internal gui name="Listen-only" */ 202 CANEXCEL_LOOPBACK_MODE /**< Loop-back mode @internal gui name="Loop back" */ 203 } Canexcel_Ip_ModesType; 204 205 /*! @brief The type of the event which occurred when the callback was invoked. 206 */ 207 /* implements Canexcel_Ip_EventType_typedef */ 208 typedef enum 209 { 210 CANEXCEL_EVENT_RX_COMPLETE = 0U, /**< A frame was received in the configured Rx Descriptor. */ 211 CANEXCEL_EVENT_TX_COMPLETE, /**< A frame was sent from the configured Tx Descriptor. */ 212 CANEXCEL_EVENT_RXFIFO_COMPLETE, /**< A frame was received in the Rx FIFO. */ 213 CANEXCEL_EVENT_RXFIFO_OVERFLOW, /**< Rx FIFO is full (incoming message was lost). */ 214 CANEXCEL_EVENT_ERROR, /**< Errors detected in CAN frames of any format (interrupt mode only) */ 215 CANEXCEL_EVENT_ERROR_FD, /**< Errors detected in the data phase of CAN FD frames with the BRS bit set only (interrupt mode only) */ 216 CANEXCEL_EVENT_ERROR_XL, /**< Errors detected in the data phase of CAN XL frames*/ 217 CANEXCEL_EVENT_PASSIVE, /**< The module enters in Passive State */ 218 CANEXCEL_EVENT_BUSOFF, /**< The module enters in BusOff State */ 219 CANEXCEL_EVENT_RX_WARNING, /**< The Rx error counter transitioned from less than 96 to greater than or equal to 96 (interrupt mode only) */ 220 CANEXCEL_EVENT_TX_WARNING /**< The Tx error counter transitioned from less than 96 to greater than or equal to 96 (interrupt mode only) */ 221 } Canexcel_Ip_EventType; 222 223 /*! @brief CanExcel Message Descriptor Queue Config */ 224 /* implements Canexcel_Ip_QueueConf_typedef */ 225 typedef struct{ 226 uint8 mdQueueWatermark; /*!< The Msg Descriptor Grup Watermark Level */ 227 uint8 mdQueueDepth; /*!< The Msg Descriptor Grup Queue Depth */ 228 } Canexcel_Ip_QueueConf; 229 230 /*! @brief CanExcel Rx FIFO filter type */ 231 /* implements Canexcel_Ip_RxFifoFilterType_enum */ 232 typedef enum 233 { 234 CANEXCEL_IP_RX_FIFO_RANGE_FILTER = 0U, /*!< Filter element with range scheme*/ 235 CANEXCEL_IP_RX_FIFO_MASK_FILTER, /*!< Filter element with filter + mask scheme*/ 236 } Canexcel_Ip_RxFifoFilterType; 237 /* implements Canexcel_Ip_TransceiverModeType_typedef */ 238 typedef struct{ 239 boolean PwmModeEnable; /*!< Enable/disable PWM mode */ 240 uint8 PwmShortPhase; /*!< PWM Short Phase */ 241 uint8 PwmLongPhase; /*!< PWM Long Phase */ 242 uint8 PwmOffset; /*!< PWM Offset */ 243 boolean ProtocolExceptionEnable; /*!< TRUE to signalize errors as protocol exception; FALSE to signalize errors with Error frames */ 244 } Canexcel_Ip_TransceiverModeType; 245 /* implements Canexcel_Ip_RxFifoFilterID_ADDR_typedef */ 246 typedef struct{ 247 Canexcel_Ip_RxFifoFilterType filterType; 248 uint32 idAddrFilterH; /* Filter ID/ADDR element in case of mask filter type this is ID/ADDR value, in case of range filter type this is the higher value. */ 249 uint32 idAddrFilterL; /*Canexcel_Ip_RxFifoFilterID_ADDR Filter ID/ADDR element in case of mask filter type this is mask value, in case of range filter type this is the lower value. */ 250 } Canexcel_Ip_RxFifoFilterID_ADDR; 251 /* implements Canexcel_Ip_RxFifoFilterSDU_CAN_typedef */ 252 typedef struct{ 253 Canexcel_Ip_RxFifoFilterType filterType; 254 uint8 sduVcanFilterH; /* Filter SDU/VCAN element in case of mask filter type this is SDU/VCAN value, in case of range filter type this is the higher value. */ 255 uint8 sduVcanFilterL; /* Filter SDU/VCAN element in case of mask filter type this is mask value, in case of range filter type this is the lower value. */ 256 } Canexcel_Ip_RxFifoFilterSDU_CAN; 257 258 /*! @brief CanExcel Rx FIFO filter Config Structure */ 259 /* implements Canexcel_Ip_RxFifoFilter_structure */ 260 typedef struct{ 261 uint32 SecMask; 262 uint32 SecFilter; 263 uint8 noIdFilters; 264 uint8 noActAddrFilters; 265 uint8 noSduFilters; 266 uint8 noVcanFilters; 267 Canexcel_Ip_RxFifoFilterID_ADDR * IdFilterPtr; /* Pointer to the array with ID filter configs */ 268 Canexcel_Ip_RxFifoFilterID_ADDR * AddrFilterPtr; /* Pointer to the array with Acceptance Address filter configs */ 269 Canexcel_Ip_RxFifoFilterSDU_CAN * SduFilterPtr; /* Pointer to the array with Sdu Filter configs */ 270 Canexcel_Ip_RxFifoFilterSDU_CAN * VcanFilterPtr; /* Pointer to the array with VCAN Filter configs */ 271 } Canexcel_Ip_RxFifoFilter; 272 273 /* implements Canexcel_Ip_BankFilter_structure */ 274 typedef struct{ 275 uint8 noActAddrFilters; /* No Of Address Accept Filters */ 276 uint8 noSduFilters; /* No of SDU type Filters */ 277 uint8 noVcanFilters; /* No of VCAN Filters */ 278 const Canexcel_Ip_RxFifoFilterID_ADDR * AddrFilterPtr; /* Pointer to the array with Acceptance Address filter configs */ 279 const Canexcel_Ip_RxFifoFilterSDU_CAN * SduFilterPtr; /* Pointer to the array with Sdu Filter configs */ 280 const Canexcel_Ip_RxFifoFilterSDU_CAN * VcanFilterPtr; /* Pointer to the array with VCAN Filter configs */ 281 } Canexcel_Ip_BankFilter; 282 283 /* implements Canexcel_Ip_DataInfoType_structure */ 284 typedef struct{ 285 Canexcel_Ip_FrameType frame; 286 Canexcel_Ip_MsgBuffIdType idType; 287 uint8 priority; 288 uint8 retransmission; 289 boolean enable_brs; /**< Enable bit rate switch inside a CAN FD format frame*/ 290 uint8 fd_padding; /**< Set a value for padding. It will be used when the data length code (DLC) 291 specifies a bigger payload size than data_length to fill the MB */ 292 uint16 dataLength; /**< Length of data in bytes */ 293 uint8 SDT; 294 boolean SEC; 295 uint8 VCID; 296 boolean is_polling; 297 } Canexcel_Ip_DataInfoType; 298 299 /* implements Canexcel_TxMsgHeaderType_typedef */ 300 typedef struct 301 { 302 uint32 timeStampL; 303 uint32 timeStampH; 304 uint32 word2; 305 uint32 word3; 306 uint32 word4; 307 } Canexcel_TxMsgHeaderType; 308 309 /* implements Canexcel_TxFdMsgType_typedef */ 310 typedef struct{ 311 Canexcel_TxMsgHeaderType Header; 312 uint8 data[64]; 313 } Canexcel_TxFdMsgType; 314 /* implements Canexcel_TxXlMsgType_typedef */ 315 typedef struct{ 316 Canexcel_TxMsgHeaderType Header; 317 uint32 AF; 318 uint8 data[2048]; 319 } Canexcel_TxXlMsgType; 320 321 /* implements Canexcel_RxHeader_typedef */ 322 typedef struct{ 323 uint32 Id; 324 uint32 Control; 325 } Canexcel_RxHeader; 326 /* implements Canexcel_RxFdMsg_typedef */ 327 typedef struct{ 328 Canexcel_RxHeader Header; 329 uint8 data[64]; 330 uint32 timeStampL; 331 uint32 timeStampH; 332 }Canexcel_RxFdMsg; 333 /* implements Canexcel_RxXlMsg_typedef */ 334 typedef struct{ 335 Canexcel_RxHeader Header; 336 uint32 AF; 337 uint8 data[2048]; 338 uint32 timeStampL; 339 uint32 timeStampH; 340 }Canexcel_RxXlMsg; 341 342 /*! @brief CAN Excel bitrate related structures 343 */ 344 /* implements Canexcel_Ip_TimeSegmentType_structure */ 345 typedef struct 346 { 347 uint32 propSeg; /**< Propagation segment*/ 348 uint32 phaseSeg1; /**< Phase segment 1*/ 349 uint32 phaseSeg2; /**< Phase segment 2*/ 350 uint32 preDivider; /**< Clock prescaler division factor*/ 351 uint32 rJumpwidth; /**< Resync jump width*/ 352 } Canexcel_Ip_TimeSegmentType; 353 354 /*! @brief Information needed for internal handling of a given MessageDescriptor. */ 355 /* implements Canexcel_Ip_MDhandleType_structure */ 356 typedef struct 357 { 358 uint32 list[16]; /**< The Can Message Buffer Pointer List array */ 359 uint8 noPointers; /**< The No of Message Pointers List sent\received */ 360 boolean isPolling; /**< True if the transfer is Polling Mode */ 361 boolean isRemote; /**< True if the frame is a remote frame */ 362 boolean isXLFrame; /**< True for XLFrame Types, False for Classic and FD frames. */ 363 } Canexcel_Ip_MDhandleType; 364 365 /*! 366 * @brief Internal driver state information. 367 * 368 * @note The contents of this structure are internal to the driver and should not be 369 * modified by users. Also, contents of the structure are subject to change in 370 * future releases. 371 */ 372 /* implements Canexcel_Ip_StateType_structure */ 373 typedef struct CanexcelState 374 { 375 Canexcel_Ip_MDhandleType msgDesc[CANXL_MSG_DESCRIPTORS_MSGDSC_COUNT]; 376 Canexcel_Ip_MDhandleType rxFifo; 377 boolean isIntActive; /**< Save status of enabling/disabling interrupts in runtime. */ 378 void (*callback)(uint8 instance, 379 Canexcel_Ip_EventType eventType, 380 uint32 buffIdx, 381 const struct CanexcelState *driverState 382 ); /**< IRQ handler callback function. */ 383 void * callbackParam; /**< Parameter used to pass user data 384 when invoking the callback 385 function. */ 386 void (*error_callback)(uint8 instance, 387 Canexcel_Ip_EventType eventType, 388 uint32 u32SysStatus, 389 const struct CanexcelState *driverState 390 ); /**< Error IRQ handler callback 391 function. */ 392 void *errorCallbackParam; /**< Parameter used to pass user data 393 when invoking the error callback 394 function. */ 395 uint8 u8MruMailboxAct; /**< Sets 1 the serviced Mailbox from CanEXCEL MRU */ 396 } Canexcel_Ip_StateType; 397 398 /* implements Canexcel_Ip_RxFifoConfig_Type_structure */ 399 typedef struct{ 400 uint8 Rx_Fifo_Depth; 401 uint8 Rx_Fifo_Watermark; 402 uint16 Rx_Fifo_Msg_Size; 403 boolean Rx_Fifo_KeepLast; 404 boolean isPolling; 405 Canexcel_Ip_FrameType frameType; 406 uint32 * MsgBuffersPtr; 407 }Canexcel_Ip_RxFifoConfig_Type; 408 409 410 /*! @brief CanExcel Driver callback function type 411 */ 412 /* implements Canexcel_Ip_CallbackType_typedef */ 413 typedef void (* Canexcel_Ip_CallbackType)(uint8 instance, 414 Canexcel_Ip_EventType eventType, 415 uint32 buffIdx, 416 const Canexcel_Ip_StateType * canexcelState 417 ); 418 419 /*! @brief CanExcel Driver error callback function type 420 */ 421 /* implements Canexcel_Ip_ErrorCallbackType_typedef */ 422 typedef void (* Canexcel_Ip_ErrorCallbackType)(uint8 instance, 423 Canexcel_Ip_EventType eventType, 424 uint32 u32SysStatus, 425 const Canexcel_Ip_StateType * canexcelState 426 ); 427 428 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 429 /*! @brief CanEXCEL configuration for TimeStamp 430 */ 431 /* implements Canexcel_Ip_TimeStampConf_Type_typedef */ 432 typedef struct{ 433 boolean ts64bit; 434 Canexcel_Ip_TimeStampCaptureType capture; 435 Canexcel_Ip_TimeBaseSelType src; 436 } Canexcel_Ip_TimeStampConf_Type; 437 #endif 438 439 /*! @brief CanEXCEL configuration 440 * @internal gui name="Common configuration" id="canexcelCfg" 441 */ 442 /* implements Canexcel_Ip_ConfigType_structure */ 443 typedef struct{ 444 uint8 rx_mbdesc; /**< No of Rx Descriptor to be used.*/ 445 uint8 tx_mbdesc; /**< No of Tx Descriptor to be used.*/ 446 Canexcel_Ip_ModesType CanxlMode; /**< User configurable CanEXCEL operation modes. 447 @internal gui name="Canexcel Operation Mode" id="CanxlMode" */ 448 boolean fd_enable; /**< Enable/Disable the Flexible Data Rate feature. */ 449 boolean bitRateSwitch; /**< Enable of BitRate Switch support for FD frames */ 450 boolean xl_enable; /**< Enable/Disable the XL Frame feature. */ 451 uint32 ctrlOptions; /**< Use of different features support like EDGE_FILTER, AUTO_BussOffRecovery, Protocol_Exception. */ 452 boolean is_rx_fifo_needed; /**< 1 if needed; 0 if not. This controls whether the Rx FIFO feature is enabled or not. 453 @internal gui name="Use rx fifo" id="is_rx_fifo_needed" */ 454 Canexcel_Ip_RxFifoConfig_Type pRxFifoConfig; /**< The RxFifo configuration */ 455 Canexcel_Ip_QueueConf QueueMDConfig[CANXL_GRP_CONTROL_FIFOCTRLREQ_COUNT*2]; /**< The configurations for the Message Descriptor Queue Grups */ 456 Canexcel_Ip_TimeSegmentType bitrate; /**< The bitrate used for standard frames or for the arbitration phase of FD frames. */ 457 Canexcel_Ip_TimeSegmentType Fd_bitrate; /**< The bitrate used for the data phase of FD frames. */ 458 Canexcel_Ip_TimeSegmentType Xl_bitrate; /**< The bitrate used for the data phase of XL frames. */ 459 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 460 Canexcel_Ip_TimeStampConf_Type TimestampConfig;/**< The Timestamp configuration */ 461 #endif 462 Canexcel_Ip_CallbackType Callback; /**< The Callback for Rx or Tx, FIFO Events */ 463 Canexcel_Ip_ErrorCallbackType ErrorCallback; /**< The ErrorCallback for Error Events */ 464 } Canexcel_Ip_ConfigType; 465 466 #ifdef __cplusplus 467 } 468 #endif /* __cplusplus */ 469 470 /** @} */ 471 472 #endif /* CANEXCEL_IP_TYPES_H_ */ 473