1 /* 2 * Copyright 2021-2024 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 2 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 CANXL_MRU_Type ** EXL_MRU; 83 CANXL_GRP_CONTROL_Type ** EXL_GRP; 84 CANXL_DSC_CONTROL_Type ** EXL_DESC_CTR; 85 CANXL_MSG_DESCRIPTORS_Type ** EXL_MSGD; 86 CANXL_RXFIFO_CONTROL_Type ** EXL_RXF_CNT; 87 CANXL_RXFIFO_Type ** EXL_RXFIFO; 88 CANXL_FILTER_BANK_Type ** EXL_FILTER; 89 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 90 CAN_TBS_Type ** EXL_TBS; 91 #endif 92 } CANEXCEL_StructType; 93 94 /** @brief CanEXCEL Message Buffer ID type 95 * @details CanEXCEL Id Type, Standard or Extended 96 */ 97 /* implements Canexcel_Ip_MsgBuffIdType_enum */ 98 typedef enum 99 { 100 CANEXCEL_MSG_ID_STD = 0, /**< Standard ID*/ 101 CANEXCEL_MSG_ID_EXT /**< Extended ID*/ 102 } Canexcel_Ip_MsgBuffIdType; 103 104 /** @brief CanEXCEL Message Format type 105 * @details CanEXCEL CAN Frame type, Classic, FastData(FD), and XL 106 */ 107 /* implements Canexcel_Ip_FrameType_enum */ 108 typedef enum 109 { 110 CANEXCEL_CLASIC_FRAME, 111 CANEXCEL_FD_FRAME, 112 CANEXCEL_XL_FRAME 113 } Canexcel_Ip_FrameType; 114 115 /** @brief The status of data coherency mechanism for semaphore-based access to device RAM. 116 * @details The descriptor control Status mechanism 117 */ 118 /* implements Canexcel_Ip_DesCntStatus_typedef */ 119 typedef enum 120 { 121 CANEXCEL_DESCNTSTATUS_UNLOCKED, /**< Descriptor is not locked. */ 122 CANEXCEL_DESCNTSTATUS_LOCKED_HW, /**< Descriptor is locked by CANEXCEL hardware. */ 123 CANEXCEL_DESCNTSTATUS_LOCKED_SYS, /**< Descriptor is locked by system host. */ 124 CANEXCEL_DESCNTSTATUS_INVALID /**< Invalid configuration, not possible. */ 125 } Canexcel_Ip_DesCntStatus; 126 127 /** @brief The status of descriptor state. 128 * @details The descriptor control Status mechanism 129 */ 130 /* implements Canexcel_Ip_DescState_typedef */ 131 typedef enum 132 { 133 CANEXCEL_DESC_STATE_INACTIVE, 134 CANEXCEL_DESC_STATE_EMPTY, 135 CANEXCEL_DESC_STATE_NOTFULL, 136 CANEXCEL_DESC_STATE_FULL, 137 CANEXCEL_DESC_STATE_OVERRUN 138 } Canexcel_Ip_DescState; 139 140 /** @brief Canexcel error interrupt types 141 */ 142 /* implements Canexcel_Ip_ErrorIntType_enum */ 143 typedef enum 144 { 145 CANEXCEL_IP_INT_RX_WARNING, /*!< RX warning interrupt*/ 146 CANEXCEL_IP_INT_TX_WARNING, /*!< TX warning interrupt*/ 147 CANEXCEL_IP_INT_ERR, /*!< Error interrupt*/ 148 CANEXCEL_IP_INT_ERR_FAST, /*!< Error Fast interrupt*/ 149 CANEXCEL_IP_INT_ERR_XL, /*!< Error XL interrupt*/ 150 CANEXCEL_IP_INT_ERR_INT, /*!< Error Internal interrupt*/ 151 CANEXCEL_IP_INT_BUSOFF, /*!< Bus off interrupt*/ 152 CANEXCEL_IP_INT_BUSOFF_DONE, /*!< Bus off done interrupt*/ 153 CANEXCEL_IP_INT_PASS_ERR, /*!< Passive error interrupt*/ 154 CANEXCEL_IP_INT_FREEZE, /*!< ACk Freeze event interrupt*/ 155 } Canexcel_Ip_ErrorIntType; 156 157 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 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 #endif /* (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) */ 181 182 /** @brief The status used and reported by Canexcel Ip driver. 183 * @details The CanEXCEL specific error codes 184 */ 185 /* implements Canexcel_Ip_StatusType_enum */ 186 typedef enum 187 { 188 CANEXCEL_STATUS_SUCCESS = E_OK, /**< Successfull Operation Completed */ 189 CANEXCEL_STATUS_ERROR = E_NOT_OK, /**< Error Operation Completed */ 190 CANEXCEL_STATUS_BUSY, /**< Busy Operation Completed */ 191 CANEXCEL_STATUS_TIMEOUT, /**< TimeOut Operation Completed */ 192 CANEXCEL_STATUS_BUFF_OUT_OF_RANGE, /**< The specified MB index is out of the configurable range */ 193 CANEXCEL_STATUS_NO_TRANSFER_IN_PROGRESS, /**< There is no transmission or reception in progress */ 194 } Canexcel_Ip_StatusType; 195 196 /*! @brief CANXL operation modes 197 */ 198 /* implements Canexcel_Ip_ModesType_typedef */ 199 typedef enum 200 { 201 CANEXCEL_NORMAL_MODE, /**< Normal mode or user mode @internal gui name="Normal" */ 202 CANEXCEL_LISTEN_ONLY_MODE, /**< Listen-only mode @internal gui name="Listen-only" */ 203 CANEXCEL_LOOPBACK_MODE /**< Loop-back mode @internal gui name="Loop back" */ 204 } Canexcel_Ip_ModesType; 205 206 /*! @brief The type of the event which occurred when the callback was invoked. 207 */ 208 /* implements Canexcel_Ip_EventType_typedef */ 209 typedef enum 210 { 211 CANEXCEL_EVENT_RX_COMPLETE = 0U, /**< A frame was received in the configured Rx Descriptor. */ 212 CANEXCEL_EVENT_TX_COMPLETE, /**< A frame was sent from the configured Tx Descriptor. */ 213 CANEXCEL_EVENT_RXFIFO_COMPLETE, /**< A frame was received in the Rx FIFO. */ 214 CANEXCEL_EVENT_RXFIFO_OVERFLOW, /**< Rx FIFO is full (incoming message was lost). */ 215 CANEXCEL_EVENT_ERROR, /**< Errors detected in CAN frames of any format (interrupt mode only) */ 216 CANEXCEL_EVENT_ERROR_FD, /**< Errors detected in the data phase of CAN FD frames with the BRS bit set only (interrupt mode only) */ 217 CANEXCEL_EVENT_ERROR_XL, /**< Errors detected in the data phase of CAN XL frames*/ 218 CANEXCEL_EVENT_PASSIVE, /**< The module enters in Passive State */ 219 CANEXCEL_EVENT_BUSOFF, /**< The module enters in BusOff State */ 220 CANEXCEL_EVENT_RX_WARNING, /**< The Rx error counter transitioned from less than 96 to greater than or equal to 96 (interrupt mode only) */ 221 CANEXCEL_EVENT_TX_WARNING /**< The Tx error counter transitioned from less than 96 to greater than or equal to 96 (interrupt mode only) */ 222 } Canexcel_Ip_EventType; 223 224 /*! @brief CanExcel Message Descriptor Queue Config */ 225 /* implements Canexcel_Ip_QueueConf_typedef */ 226 typedef struct{ 227 uint8 mdQueueWatermark; /*!< The Msg Descriptor Grup Watermark Level */ 228 uint8 mdQueueDepth; /*!< The Msg Descriptor Grup Queue Depth */ 229 } Canexcel_Ip_QueueConf; 230 231 /*! @brief CanExcel Rx FIFO filter type */ 232 /* implements Canexcel_Ip_RxFifoFilterType_enum */ 233 typedef enum 234 { 235 CANEXCEL_IP_RX_FIFO_RANGE_FILTER = 0U, /*!< Filter element with range scheme*/ 236 CANEXCEL_IP_RX_FIFO_MASK_FILTER, /*!< Filter element with filter + mask scheme*/ 237 } Canexcel_Ip_RxFifoFilterType; 238 /* implements Canexcel_Ip_TransceiverModeType_typedef */ 239 typedef struct{ 240 boolean PwmModeEnable; /*!< Enable/disable PWM mode */ 241 uint8 PwmShortPhase; /*!< PWM Short Phase */ 242 uint8 PwmLongPhase; /*!< PWM Long Phase */ 243 uint8 PwmOffset; /*!< PWM Offset */ 244 boolean ProtocolExceptionEnable; /*!< TRUE to signalize errors as protocol exception; FALSE to signalize errors with Error frames */ 245 } Canexcel_Ip_TransceiverModeType; 246 /* implements Canexcel_Ip_RxFifoFilterID_ADDR_typedef */ 247 typedef struct{ 248 Canexcel_Ip_RxFifoFilterType filterType; 249 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. */ 250 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. */ 251 } Canexcel_Ip_RxFifoFilterID_ADDR; 252 /* implements Canexcel_Ip_RxFifoFilterSDU_CAN_typedef */ 253 typedef struct{ 254 Canexcel_Ip_RxFifoFilterType filterType; 255 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. */ 256 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. */ 257 } Canexcel_Ip_RxFifoFilterSDU_CAN; 258 259 /*! @brief CanExcel Rx FIFO filter Config Structure */ 260 /* implements Canexcel_Ip_RxFifoFilter_structure */ 261 typedef struct{ 262 uint32 SecMask; 263 uint32 SecFilter; 264 uint8 noIdFilters; 265 uint8 noActAddrFilters; 266 uint8 noSduFilters; 267 uint8 noVcanFilters; 268 Canexcel_Ip_RxFifoFilterID_ADDR * IdFilterPtr; /* Pointer to the array with ID filter configs */ 269 Canexcel_Ip_RxFifoFilterID_ADDR * AddrFilterPtr; /* Pointer to the array with Acceptance Address filter configs */ 270 Canexcel_Ip_RxFifoFilterSDU_CAN * SduFilterPtr; /* Pointer to the array with Sdu Filter configs */ 271 Canexcel_Ip_RxFifoFilterSDU_CAN * VcanFilterPtr; /* Pointer to the array with VCAN Filter configs */ 272 } Canexcel_Ip_RxFifoFilter; 273 274 /* implements Canexcel_Ip_BankFilter_structure */ 275 typedef struct{ 276 uint8 noActAddrFilters; /* No Of Address Accept Filters */ 277 uint8 noSduFilters; /* No of SDU type Filters */ 278 uint8 noVcanFilters; /* No of VCAN Filters */ 279 const Canexcel_Ip_RxFifoFilterID_ADDR * AddrFilterPtr; /* Pointer to the array with Acceptance Address filter configs */ 280 const Canexcel_Ip_RxFifoFilterSDU_CAN * SduFilterPtr; /* Pointer to the array with Sdu Filter configs */ 281 const Canexcel_Ip_RxFifoFilterSDU_CAN * VcanFilterPtr; /* Pointer to the array with VCAN Filter configs */ 282 } Canexcel_Ip_BankFilter; 283 284 /* implements Canexcel_Ip_DataInfoType_structure */ 285 typedef struct{ 286 Canexcel_Ip_FrameType frame; 287 Canexcel_Ip_MsgBuffIdType idType; 288 uint8 priority; 289 uint8 retransmission; 290 boolean enable_brs; /**< Enable bit rate switch inside a CAN FD format frame*/ 291 uint8 fd_padding; /**< Set a value for padding. It will be used when the data length code (DLC) 292 specifies a bigger payload size than data_length to fill the MB */ 293 uint16 dataLength; /**< Length of data in bytes */ 294 uint8 SDT; 295 boolean SEC; 296 uint8 VCID; 297 uint32 AF; 298 boolean is_polling; 299 } Canexcel_Ip_DataInfoType; 300 301 /* implements Canexcel_TxMsgHeaderType_typedef */ 302 typedef struct 303 { 304 uint32 timeStampL; 305 uint32 timeStampH; 306 uint32 word2; 307 uint32 word3; 308 uint32 word4; 309 } Canexcel_TxMsgHeaderType; 310 311 /* implements Canexcel_TxFdMsgType_typedef */ 312 typedef struct{ 313 Canexcel_TxMsgHeaderType Header; 314 uint8 data[64]; 315 } Canexcel_TxFdMsgType; 316 /* implements Canexcel_TxXlMsgType_typedef */ 317 typedef struct{ 318 Canexcel_TxMsgHeaderType Header; 319 uint32 AF; 320 uint8 data[2048]; 321 } Canexcel_TxXlMsgType; 322 323 /* implements Canexcel_RxHeader_typedef */ 324 typedef struct{ 325 uint32 Id; 326 uint32 Control; 327 } Canexcel_RxHeader; 328 /* implements Canexcel_RxFdMsg_typedef */ 329 typedef struct{ 330 Canexcel_RxHeader Header; 331 uint8 data[64]; 332 uint32 timeStampL; 333 uint32 timeStampH; 334 }Canexcel_RxFdMsg; 335 /* implements Canexcel_RxXlMsg_typedef */ 336 typedef struct{ 337 Canexcel_RxHeader Header; 338 uint32 AF; 339 uint8 data[2048]; 340 uint32 timeStampL; 341 uint32 timeStampH; 342 }Canexcel_RxXlMsg; 343 344 /*! @brief CAN Excel bitrate related structures 345 */ 346 /* implements Canexcel_Ip_TimeSegmentType_structure */ 347 typedef struct 348 { 349 uint32 propSeg; /**< Propagation segment*/ 350 uint32 phaseSeg1; /**< Phase segment 1*/ 351 uint32 phaseSeg2; /**< Phase segment 2*/ 352 uint32 preDivider; /**< Clock prescaler division factor*/ 353 uint32 rJumpwidth; /**< Resync jump width*/ 354 } Canexcel_Ip_TimeSegmentType; 355 356 /*! @brief Information needed for internal handling of a given MessageDescriptor. */ 357 /* implements Canexcel_Ip_MDhandleType_structure */ 358 typedef struct 359 { 360 uint32 list[16]; /**< The Can Message Buffer Pointer List array */ 361 boolean isPending[16]; /**< TRUE when the user pushes a pointer to the mb, FALSE when the mb processed in mainfunction/ISR */ 362 uint8 lastHwIdex; /**< The No of Message Pointers List sent\received */ 363 uint8 noPointers; /**< The No of Message Pointers List sent\received */ 364 boolean isPolling; /**< True if the transfer is Polling Mode */ 365 boolean isRemote; /**< True if the frame is a remote frame */ 366 boolean isXLFrame; /**< True for XLFrame Types, False for Classic and FD frames. */ 367 } Canexcel_Ip_MDhandleType; 368 369 /*! 370 * @brief Internal driver state information. 371 * 372 * @note The contents of this structure are internal to the driver and should not be 373 * modified by users. Also, contents of the structure are subject to change in 374 * future releases. 375 */ 376 /* implements Canexcel_Ip_StateType_structure */ 377 typedef struct CanexcelState 378 { 379 Canexcel_Ip_MDhandleType msgDesc[CANXL_MSG_DESCRIPTORS_MSGDSC_COUNT]; 380 Canexcel_Ip_MDhandleType rxFifo; 381 boolean isIntActive; /**< Save status of enabling/disabling interrupts in runtime. */ 382 void (*callback)(uint8 instance, 383 Canexcel_Ip_EventType eventType, 384 uint32 buffIdx, 385 const struct CanexcelState *driverState 386 ); /**< IRQ handler callback function. */ 387 void * callbackParam; /**< Parameter used to pass user data 388 when invoking the callback 389 function. */ 390 void (*error_callback)(uint8 instance, 391 Canexcel_Ip_EventType eventType, 392 uint32 u32SysStatus, 393 const struct CanexcelState *driverState 394 ); /**< Error IRQ handler callback 395 function. */ 396 void *errorCallbackParam; /**< Parameter used to pass user data 397 when invoking the error callback 398 function. */ 399 uint8 u8MruMailboxAct; /**< Sets 1 the serviced Mailbox from CanEXCEL MRU */ 400 } Canexcel_Ip_StateType; 401 402 /* implements Canexcel_Ip_RxFifoConfig_Type_structure */ 403 typedef struct{ 404 uint8 Rx_Fifo_Depth; 405 uint8 Rx_Fifo_Watermark; 406 uint16 Rx_Fifo_Msg_Size; 407 boolean Rx_Fifo_KeepLast; 408 boolean isPolling; 409 Canexcel_Ip_FrameType frameType; 410 uint32 * MsgBuffersPtr; 411 }Canexcel_Ip_RxFifoConfig_Type; 412 413 414 /*! @brief CanExcel Driver callback function type 415 */ 416 /* implements Canexcel_Ip_CallbackType_typedef */ 417 typedef void (* Canexcel_Ip_CallbackType)(uint8 instance, 418 Canexcel_Ip_EventType eventType, 419 uint32 buffIdx, 420 const Canexcel_Ip_StateType * canexcelState 421 ); 422 423 /*! @brief CanExcel Driver error callback function type 424 */ 425 /* implements Canexcel_Ip_ErrorCallbackType_typedef */ 426 typedef void (* Canexcel_Ip_ErrorCallbackType)(uint8 instance, 427 Canexcel_Ip_EventType eventType, 428 uint32 u32SysStatus, 429 const Canexcel_Ip_StateType * canexcelState 430 ); 431 432 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 433 /*! @brief CanEXCEL configuration for TimeStamp 434 */ 435 /* implements Canexcel_Ip_TimeStampConf_Type_typedef */ 436 typedef struct{ 437 boolean ts64bit; 438 Canexcel_Ip_TimeStampCaptureType capture; 439 Canexcel_Ip_TimeBaseSelType src; 440 } Canexcel_Ip_TimeStampConf_Type; 441 #endif 442 443 /*! @brief CanEXCEL configuration 444 * @internal gui name="Common configuration" id="canexcelCfg" 445 */ 446 /* implements Canexcel_Ip_ConfigType_structure */ 447 typedef struct{ 448 uint8 rx_mbdesc; /**< No of Rx Descriptor to be used.*/ 449 uint8 tx_mbdesc; /**< No of Tx Descriptor to be used.*/ 450 Canexcel_Ip_ModesType CanxlMode; /**< User configurable CanEXCEL operation modes. 451 @internal gui name="Canexcel Operation Mode" id="CanxlMode" */ 452 boolean fd_enable; /**< Enable/Disable the Flexible Data Rate feature. */ 453 boolean bitRateSwitch; /**< Enable of BitRate Switch support for FD frames */ 454 boolean xl_enable; /**< Enable/Disable the XL Frame feature. */ 455 uint32 ctrlOptions; /**< Use of different features support like EDGE_FILTER, AUTO_BussOffRecovery, Protocol_Exception. */ 456 boolean is_rx_fifo_needed; /**< 1 if needed; 0 if not. This controls whether the Rx FIFO feature is enabled or not. 457 @internal gui name="Use rx fifo" id="is_rx_fifo_needed" */ 458 Canexcel_Ip_RxFifoConfig_Type pRxFifoConfig; /**< The RxFifo configuration */ 459 Canexcel_Ip_QueueConf QueueMDConfig[CANXL_GRP_CONTROL_FIFOCTRLREQ_COUNT*2]; /**< The configurations for the Message Descriptor Queue Grups */ 460 Canexcel_Ip_TimeSegmentType bitrate; /**< The bitrate used for standard frames or for the arbitration phase of FD frames. */ 461 Canexcel_Ip_TimeSegmentType Fd_bitrate; /**< The bitrate used for the data phase of FD frames. */ 462 Canexcel_Ip_TimeSegmentType Xl_bitrate; /**< The bitrate used for the data phase of XL frames. */ 463 #if (CANEXCEL_IP_HAS_TS_ENABLE == STD_ON) 464 Canexcel_Ip_TimeStampConf_Type TimestampConfig;/**< The Timestamp configuration */ 465 #endif 466 Canexcel_Ip_CallbackType Callback; /**< The Callback for Rx or Tx, FIFO Events */ 467 Canexcel_Ip_ErrorCallbackType ErrorCallback; /**< The ErrorCallback for Error Events */ 468 } Canexcel_Ip_ConfigType; 469 470 #ifdef __cplusplus 471 } 472 #endif /* __cplusplus */ 473 474 /** @} */ 475 476 #endif /* CANEXCEL_IP_TYPES_H_ */ 477