Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
can_types.h
Go to the documentation of this file.
1 /**************************************************************************************************
2 * _ _ ___ _ *
3 * (_)| |__ _ __ / _ \ _ __ ___ | |__ /\ /\ *
4 * | || '_ \ | '__| / /_\/| '_ ` _ \ | '_ \ / /_/ / *
5 * | || | | || | / /_\\ | | | | | || |_) |/ __ / *
6 * |_||_| |_||_| \____/ |_| |_| |_||_.__/ \/ /_/ *
7 * *
8 * ihr GmbH *
9 * Airport Boulevard B210 *
10 * 77836 Rheinmuenster - Germany *
11 * http://www.ihr.de *
12 * Phone +49(0) 7229-18475-0 *
13 * Fax +49(0) 7229-18475-11 *
14 ***************************************************************************************************
15 * *
16 * Revision: $Rev:: 276 $ *
17 * Last Modtime: $Date:: 2022-05-20#$ *
18 * Last Modification: $Author:: PhilippKoch $ *
19 * *
20 **************************************************************************************************/
26 #ifndef CAN_TYPES_H
27 #define CAN_TYPES_H
28 
29 #include "types.h"
30 #include "can_cfg.h"
31 #include "com_types.h"
32 
33 /* Can/Com API return values and error codes */
34 #define E_OK (0x00) /* Access successful */
35 #define E_NOT_OK (0x01) /* invocation of service failed, i.e. parameter error, out of range */
36 #define E_NOT_AVAILABLE (0x80) /* service currently not available (i.e. not initialized, not started) */
37 #define E_BUSY (0x81) /* a resource is currently in use, i.e. a buffer is locked or full */
38 #define E_RX_TIMEOUT (0x82) /* a timeout occured for the frame while DM is active */
39 #define E_RX_LENGTH (0x83) /* received frame length too long */
40 #define E_TX_OVERWRITE (0x84) /* an unsent transmit message was overwritten */
41 #define E_TX_BUFFER_FULL (0x85) /* a transmit FIFO or queue is full */
42 #define E_BUS_PASSIVE (0x86) /* CAN bus is error-passive */
43 #define E_BUS_OFF (0x87) /* CAN bus is Bus-Off */
44 
45 
46 typedef unsigned char tCanFrameHandle;
47 
48 typedef enum
49 {
50  StdId = 0u,
51  ExtId = 1u,
52  MixedId = 2u /* used in filter settings to allow both types */
54 
55 typedef struct
56 {
61 
62 typedef struct
63 {
69 
70 typedef struct
71 {
75 
76 typedef struct
77 {
79  /* message object handling descriptions */
84  tCanFifoDescriptor TxFifoDescr[N_CAN_TXFIFOS];
85  tCanFifoDescriptor RxFifoDescr[N_CAN_RXFIFOS];
86 
87  /* frame handle references */
92 
93  /* Parameters for header bitrate */
98 #if (CAN_SUPPORT_FD == STD_ON)
99  /* optional CAN-FD parameters for data bitrate */
100  uint8 FDMode;
101  uint8 DSjwQ;
102  uint8 DTseg1Q;
103  uint8 DTseg2Q;
104  uint16 DBrDiv;
105 #endif
107 
109 
110 #endif /* #ifndef CAN_TYPES_H */
const stCanNodeDescriptor * Can_GetDesc_CanNodes(void)
tCanIdType
Definition: can_types.h:49
@ StdId
Definition: can_types.h:50
@ ExtId
Definition: can_types.h:51
@ MixedId
Definition: can_types.h:52
unsigned char tCanFrameHandle
Definition: can_types.h:46
uint16 tComFrameHandle
Definition: inc/com_types.h:49
Types of COM component.
Definition: can_types.h:77
uint8 Tseg1Q
Definition: can_types.h:95
tCanFullCanDescriptor RxFullCanDescr
Definition: can_types.h:81
tComFrameHandle NTxObjects
Definition: can_types.h:89
uint8 HwNode
Definition: can_types.h:78
uint8 NRxFifos
Definition: can_types.h:83
uint8 SjwQ
Definition: can_types.h:94
tComFrameHandle NRxObjects
Definition: can_types.h:91
tComFrameHandle FirstRxHdl
Definition: can_types.h:90
uint16 BrDiv
Definition: can_types.h:97
uint8 NTxFifos
Definition: can_types.h:82
tCanFullCanDescriptor TxFullCanDescr
Definition: can_types.h:80
uint8 Tseg2Q
Definition: can_types.h:96
tComFrameHandle FirstTxHdl
Definition: can_types.h:88
Definition: can_types.h:63
tCanFrameHandle FirstFrmHdl
Definition: can_types.h:65
tCanFrameHandle NObjects
Definition: can_types.h:64
uint8 Size
Definition: can_types.h:66
tCanFilterDescriptor Filter
Definition: can_types.h:67
Definition: can_types.h:56
uint32 MsgMask
Definition: can_types.h:58
tCanIdType IdType
Definition: can_types.h:59
uint32 MsgId
Definition: can_types.h:57
Definition: can_types.h:71
tCanFrameHandle FirstFrmHdl
Definition: can_types.h:73
tCanFrameHandle NObjects
Definition: can_types.h:72
General type declarations.
uint8_t uint8
8 bit unsigned value
Definition: types.h:220
uint16_t uint16
16 bit unsigned value
Definition: types.h:221
uint32_t uint32
32 bit unsigned value
Definition: types.h:222