TMS320F28335 Library  1.0
Documentation
can.h File Reference

Header file for ADC module. More...

Go to the source code of this file.

Data Structures

struct  _CanMailbox
 CAN Mailbox Strucutre for instantiation of CAN-Mailboxes. More...
 
struct  _CanInterface
 CAN Interface: Assign GPIOs to CAN_A or CAN_B. More...
 

Typedefs

typedef enum _CAN_direction CAN_direction
 The enumeration for CAN directions. More...
 
typedef struct _CanMailbox CanMailbox
 CAN Mailbox Strucutre for instantiation of CAN-Mailboxes. More...
 
typedef struct _CanInterface CanInterface
 CAN Interface: Assign GPIOs to CAN_A or CAN_B. More...
 

Enumerations

enum  _CAN_direction { CAN_Tx, CAN_Rx }
 The enumeration for CAN directions. More...
 

Functions

int16 init_CAN (CanInterface, Uint32)
 Initializes a CAN interface with the passed baud rate. More...
 
void CAN_setupMailbox (CanInterface, Uint16, CanMailbox *)
 CAN_setup_Mailbox - Configures Register for a CAN mailbox. More...
 
int16 CAN_sendDataOnMailbox (CanInterface, Uint16, Uint64 *, Uint16)
 CAN_send - Sends a CAN message. More...
 
int16 CAN_dataAvailable (CanInterface)
 Checks if a CAN message is available in the passed CAN interface. More...
 
int16 CAN_dataAvailableAtMailbox (CanInterface, Uint16)
 Checks if a CAN message is available in the passed CAN mailbox. More...
 
void CAN_resetMailbox (CanInterface, Uint16)
 Erases the "new message" bit for the passed mailbox. More...
 
void CAN_getDataFromMailbox (CanInterface, Uint16, Uint64 *, Uint16)
 Gets the content of a received CAN message on specific mailbox and writes it to data-address. More...
 
int16 CAN_mailboxActive (CanInterface, Uint16)
 Checks if the passed mailbox is in use already (active). More...
 
int16 CAN_getNextInactiveMailbox (CanInterface)
 Get the lowest inactive mailbox from a CAN interface (0-31). More...
 
void CAN_getMailboxInformation (CanInterface, Uint16, CanMailbox *)
 Gets mailbox information. More...
 

Detailed Description

Header file for ADC module.

The TMS320F28335 has two CAN interfaces named CANA and CANB. This module can work with both interfaces. All functions expect a CAN interface passed as an argument.

Definition in file can.h.

Typedef Documentation

◆ CAN_direction

The enumeration for CAN directions.

◆ CanInterface

typedef struct _CanInterface CanInterface

CAN Interface: Assign GPIOs to CAN_A or CAN_B.


◆ CanMailbox

typedef struct _CanMailbox CanMailbox

CAN Mailbox Strucutre for instantiation of CAN-Mailboxes.


Enumeration Type Documentation

◆ _CAN_direction

The enumeration for CAN directions.

Enumerator
CAN_Tx 
CAN_Rx 

Definition at line 15 of file can.h.

Function Documentation

◆ CAN_dataAvailable()

int16 CAN_dataAvailable ( CanInterface  CAN_Int)

Checks if a CAN message is available in the passed CAN interface.

Parameters
[in]1) CAN_Interface
Returns
data available
--> 0 = no message available
--> 1 = message available

Definition at line 405 of file can.c.

405  {
406  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
407 
408  return CAN->RMP?1:0;
409 }

◆ CAN_dataAvailableAtMailbox()

int16 CAN_dataAvailableAtMailbox ( CanInterface  CAN_Int,
Uint16  mb_number 
)

Checks if a CAN message is available in the passed CAN mailbox.

Parameters
[in]1) CAN_Interface
2) mailbox number
Returns
data available
--> 0 = no
--> 1 = yes

Definition at line 419 of file can.c.

419  {
420  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
421 
422  return CAN->RMP&(1<<mb_number)?1:0;
423 }

◆ CAN_getDataFromMailbox()

void CAN_getDataFromMailbox ( CanInterface  CAN_Int,
Uint16  mb_number,
Uint64 data,
Uint16  length 
)

Gets the content of a received CAN message on specific mailbox and writes it to data-address.

Parameters
[in]1) CANInterface
2) mailbox number
3) Pointer to data
4) length of data to be read in byte
Returns
/

Definition at line 435 of file can.c.

435  { //Funktion zum Auslesen von Mailbox DATEN
436  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
437 
438  if(length<4){
439  *data |= CAN->MO[mb_number].MDL;
440  }
441  else{
442  *data |= CAN->MO[mb_number].MDL;
443  *data |= ((Uint64)CAN->MO[mb_number].MDH<<32);
444  }
445 
446  CAN->RMP |= (1<<mb_number);
447 }

◆ CAN_getMailboxInformation()

void CAN_getMailboxInformation ( CanInterface  CAN_Int,
Uint16  mb_number,
CanMailbox data 
)

Gets mailbox information.

Parameters
[in]1) CAN interface that is used
2) Number of the mailbox of which the information is needed, from 0 to 31
3) Pointer to a CAN mailbox where the mailbox data is to be stored (CanMailbox*)
Returns
/

Definition at line 501 of file can.c.

501  {
502  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
503 
504  if(CAN->MO[mb_number].ID>>31 != 0) {
505  data->Message_ID = CAN->MO[mb_number].ID&0x1FFFFFFF;
506  data->extended = 1;
507  } else {
508  data->Message_ID = (CAN->MO[mb_number].ID>>18)&0x7FF;
509  data->extended = 0;
510  }
511  data->messageLength = CAN->MO[mb_number].CTRL&0x0F;
512  data->direction = (CAN_direction)(CAN->MD&(1UL<<mb_number));
513  data->active = CAN->ME&(1UL<<mb_number)?1:0;
514 }

◆ CAN_getNextInactiveMailbox()

int16 CAN_getNextInactiveMailbox ( CanInterface  CAN_Int)

Get the lowest inactive mailbox from a CAN interface (0-31).

Parameters
[in]1) CAN_Interface
Returns
first inactive mailbox
--> 0-31 = Number of the first free mailbox in the passed interface
--> -1 = all mailboxes in use

Definition at line 481 of file can.c.

481  {
482  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
483 
484  int i;
485  for(i=0; i<32; i++) {
486  if(!(CAN->ME & (1UL<<i))) {
487  return i;
488  }
489  }
490  return -1;
491 
492 }

◆ CAN_mailboxActive()

int16 CAN_mailboxActive ( CanInterface  CAN_Int,
Uint16  mb_number 
)

Checks if the passed mailbox is in use already (active).

Parameters
[in]1) CAN_Interface
2) mailbox number
Returns
status
--> 0 = mailbox inactive
--> 1 = mailbox active

Definition at line 469 of file can.c.

469  {
470  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
471  return (CAN->ME & (1UL<<mb_number))?1:0;
472 }

◆ CAN_resetMailbox()

void CAN_resetMailbox ( CanInterface  CAN_Int,
Uint16  mb_number 
)

Erases the "new message" bit for the passed mailbox.

Parameters
[in]1) CAN_Interface
2) Number of the mailbox that shall be reset
Returns
/

Definition at line 455 of file can.c.

455  { //Funktion zum Löschen des "neue Nachricht" bit
456  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
457 
458  CAN->RMP |= (1<<mb_number);
459 }

◆ CAN_sendDataOnMailbox()

int16 CAN_sendDataOnMailbox ( CanInterface  CAN_Int,
Uint16  mb_number,
Uint64 data,
Uint16  length 
)

CAN_send - Sends a CAN message.

Parameters
[in]1) CAN_Interface
2) Number of the mailbox where the message should be sent from, from 0 to 31
3) Pointer to the content of the CAN message (max. 8 Byte)
4) Length of the CAN message to be sent in bytes (defines how much dataybtes are sent)
Returns
Result of operations as int16
--> 0 = operation successful
--> -21 = datalength too low
--> -22 = Mailbox not configured as Tx-Mailbox

Definition at line 370 of file can.c.

370  {
371  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
372 
373  if(length>8){
374  return -21;
375  }
376  if(CAN->MD & ((Uint32)0x1<<mb_number)){
377  return -22;
378  }
379 
380  CAN->MO[mb_number].MDL = 0;
381  CAN->MO[mb_number].MDH = 0;
382 
383  if(length<4) {
384  CAN->MO[mb_number].MDL |= (*data&0xFFFFFFFF);
385  } else {
386  CAN->MO[mb_number].MDL |= (*data&0xFFFFFFFF);
387  CAN->MO[mb_number].MDH |= (*data>>32)&0xFFFFFFFF;
388  }
389 
390  if(CAN->TA & ((Uint32)0x1<<mb_number)){
391  CAN->TA |= ((Uint32)0x1<<mb_number);
392  }
393 
394  CAN->TRS = ((Uint32)0x1<<mb_number); // Send Mailbox
395  return 0;
396 }

◆ CAN_setupMailbox()

void CAN_setupMailbox ( CanInterface  CAN_Int,
Uint16  mb_number,
CanMailbox mailbox 
)

CAN_setup_Mailbox - Configures Register for a CAN mailbox.

Parameters
[in]1) CAN_Interface
2) mailbox number
3) CanMailbox *mailbox
Returns
/

Definition at line 321 of file can.c.

321  {
322  TMPS_CAN CAN = CAN_getInterface(CAN_Int.canrx);
323 
324  Uint32 temp;
325  Uint32 temp1;
326  Uint32 temp2;
327  if(mailbox->extended) {
328  temp = ((Uint32)mailbox->Message_ID) | ((Uint32)0x1<<31);
329  } else {
330  temp = ((Uint32)mailbox->Message_ID<<18); //MSGID is stored in in bits 28:18.
331  }
332 
333  // Write Id-Register only when change is pending
334  if(CAN->MO[mb_number].ID != temp) {
335  temp1 = CAN->ME;
336  CAN->ME &= ~((Uint32)0x1<<mb_number); // Set off mailbox for Id change
337  CAN->MO[mb_number].ID = temp; // Write Id-register
338  }
339 
340  CAN->MO[mb_number].CTRL = (CAN->MO[mb_number].CTRL &= ~0x0F ) | mailbox->messageLength;
341 
342  if(mailbox->direction == CAN_Rx) {
343  temp2 = CAN->MD;
344  temp2 |= (1UL<<mb_number);
345  CAN->MD = temp2; // Mailbox Direction
346  } else if (mailbox->direction == CAN_Tx) {
347  CAN->MD &= ~((Uint32)0x1<<mb_number); // Mailbox Direction
348  }
349 
350  if(mailbox->active) {
351  temp1 |= (Uint32)(CAN->ME | (1<<mb_number));
352  CAN->ME = temp1; // Activate Mailbox
353  } else {
354  CAN->ME &= ~((Uint32)0x1<<mb_number); // Deactivate Mailbox
355  }
356 }

◆ init_CAN()

int16 init_CAN ( CanInterface  CAN_Int,
Uint32  baudrate 
)

Initializes a CAN interface with the passed baud rate.

Parameters
[in]1) CanInterface
2) baud rate
Returns
Result of operations as int16
--> 0 = operation successful
--> -1 = invalid value of canrx
--> -2 = invalid value of cantx
--> -8 = not able to set baudrate, baudrate too low
--> -9 = Baudrate too high 1Mbit/s
--> -10 = CAN-Module already in use
--> -11 = Tseg1 < Tseg2; Tseg1 needs to be >= Tseg2
--> -12 = Tseg1: maximal 16Tq
--> -13 = Tseg2: maximal 8Tq
--> -14 = Tseg1: minimal 2Tq
--> -15 = Tseg2: minimal 1Tq

Definition at line 31 of file can.c.

31  {
32  TMPS_CAN CAN = CAN_getInterface(CAN_Int.cantx); // Call function to assign correct address-value to variable for register-access
33  static int CAN_A_in_use=0;
34  static int CAN_B_in_use=0;
35  int i=0;
36 
37  EALLOW;
38  switch(CAN_Int.canrx){
39  case 10: if(!CAN_B_in_use){
40  TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXB)
41  TMC_BASE_PIO->CTL[0].QSEL1 |= ((Uint32)0x3 << 20); // Asynch qual for GPIO10 (CANRXB)
42  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 20); // Configure GPIO10 for CANRXB
43  switch(CAN_Int.cantx){
44  case 8: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO8 (CANTXB)
45  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 16); // Configure GPIO8 for CANTXB
46  break;
47  case 12: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
48  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 24); // Configure GPIO for CANTXB
49  break;
50  case 16: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
51  TMC_BASE_PIO->CTL[0].MUX2 |= (0x2); // Configure GPIO for CANTXB
52  break;
53  case 20: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
54  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 8); // Configure GPIO for CANTXB
55  break;
56  default: EDIS;
57  return -2;
58  }
59  CAN_B_in_use=1;
60  }
61  else{
62  return -10;
63  }
64  break;
65  case 13: if(!CAN_B_in_use){
66  TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXB)
67  TMC_BASE_PIO->CTL[0].QSEL1 |= (0x3 << (CAN_Int.canrx*2)); // Asynch qual for GPIO (CANRXB)
68  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 26); // Configure GPIO for CANRXB
69  switch(CAN_Int.cantx){
70  case 8: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO8 (CANTXB)
71  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 16); // Configure GPIO8 for CANTXB
72  break;
73  case 12: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
74  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 24); // Configure GPIO for CANTXB
75  break;
76  case 16: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
77  TMC_BASE_PIO->CTL[0].MUX2 |= (0x2); // Configure GPIO for CANTXB
78  break;
79  case 20: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
80  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 8); // Configure GPIO for CANTXB
81  break;
82  default: EDIS;
83  return -2;
84  }
85  CAN_B_in_use=1;
86  }
87  else{
88  return -10;
89  }
90  break;
91  case 17: if(!CAN_B_in_use){
92  TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXB)
93  TMC_BASE_PIO->CTL[0].QSEL2 |= (0x3 << 2); // Asynch qual for GPIO (CANRXB)
94  TMC_BASE_PIO->CTL[0].MUX2 |= (0x2 << 2); // Configure GPIO for CANRXB
95  switch(CAN_Int.cantx){
96  case 8: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO8 (CANTXB)
97  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 16); // Configure GPIO8 for CANTXB
98  break;
99  case 12: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
100  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 24); // Configure GPIO for CANTXB
101  break;
102  case 16: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
103  TMC_BASE_PIO->CTL[0].MUX2 |= (0x2); // Configure GPIO for CANTXB
104  break;
105  case 20: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
106  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 8); // Configure GPIO for CANTXB
107  break;
108  default: EDIS;
109  return -2;
110  }
111  CAN_B_in_use=1;
112  }
113  else{
114  return -10;
115  }
116  break;
117  case 18: if(!CAN_A_in_use){
118  TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXA)
119  TMC_BASE_PIO->CTL[0].QSEL2 |= (0x3 << 4); // Asynch qual for GPIO (CANRXA)
120  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 4); // Configure GPIO for CANRXA
121  switch(CAN_Int.cantx){
122  case 19: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXA)
123  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 6); // Configure GPIO for CANTXA
124  break;
125  case 31: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXA)
126  TMC_BASE_PIO->CTL[0].MUX2 |= ((Uint32)0x1 << 30); // Configure GPIO for CANTXA
127  break;
128  default: EDIS;
129  return -2;
130  }
131  CAN_A_in_use=1;
132  }
133  else{
134  return -10;
135  }
136  break;
137  case 21: if(!CAN_B_in_use){
138  TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXB)
139  TMC_BASE_PIO->CTL[0].QSEL2 |= (0x3 << 10); // Asynch qual for GPIO (CANRXB)
140  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 10); // Configure GPIO for CANRXB
141  switch(CAN_Int.cantx){
142  case 8: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO8 (CANTXB)
143  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 16); // Configure GPIO8 for CANTXB
144  break;
145  case 12: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
146  TMC_BASE_PIO->CTL[0].MUX1 |= ((Uint32)0x2 << 24); // Configure GPIO for CANTXB
147  break;
148  case 16: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
149  TMC_BASE_PIO->CTL[0].MUX2 |= (0x2); // Configure GPIO for CANTXB
150  break;
151  case 20: TMC_BASE_PIO->CTL[0].PUD &= ~(0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXB)
152  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 8); // Configure GPIO for CANTXB
153  break;
154  default: EDIS;
155  return -2;
156  }
157  CAN_B_in_use=1;
158  }
159  else{
160  return -10;
161  }
162  break;
163  case 30: if(!CAN_A_in_use){
164  TMC_BASE_PIO->CTL[0].PUD &= ~((Uint32)0x1 << CAN_Int.canrx); // Enable pull-up for GPIO(CANRXA)
165  TMC_BASE_PIO->CTL[0].QSEL2 |= ((Uint32)0x3 << 28); // Asynch qual for GPIO (CANRXA)
166  TMC_BASE_PIO->CTL[0].MUX2 |= ((Uint32)0x1 << 28); // Configure GPIO for CANRXA
167  switch(CAN_Int.cantx){
168  case 19: TMC_BASE_PIO->CTL[0].PUD &= ~((Uint32)0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXA)
169  TMC_BASE_PIO->CTL[0].MUX2 |= (0x3 << 6); // Configure GPIO for CANTXA
170  break;
171  case 31: TMC_BASE_PIO->CTL[0].PUD &= ~((Uint32)0x1 << CAN_Int.cantx); // Enable pull-up for GPIO (CANTXA)
172  TMC_BASE_PIO->CTL[0].MUX2 |= ((Uint32)0x1 << 30); // Configure GPIO for CANTXA
173  break;
174  default: EDIS;
175  return -2;
176  }
177  CAN_A_in_use=1;
178  }
179  else{
180  return -10;
181  }
182  break;
183  default: EDIS;
184  return -1;
185  }
186 
187  EALLOW;
188  CAN->RIOC = 0x08; // CANRX pin is used for the CAN receive functions.
189  CAN->TIOC = 0x08; // CANTX pin is used for the CAN transmit functions
190  CAN->MC |= (0x1 << 10); // The data is received or transmitted least significant byte first
191  CAN->MC |= (0x1 << 13); // Select eCAN mode: 32 Mailboxes
192  CAN->MC |= ((Uint32)0x1 << 16); // Free mode: The peripheral continues to run in SUSPEND
193  TMC_BASE_SCR->PCLKCR0 |= (0x1 << 14);
194  EDIS;
195 
196  for(i=0;i<32;i++) { // Clear all values of mailboxes
197  CAN->MO[i].CTRL = 0;
198  CAN->MO[i].ID = 0;
199  CAN->MO[i].MDH = 0;
200  CAN->MO[i].MDL = 0;
201  }
202 
203  return CAN_setBaudrate(CAN, baudrate);
204 }
_TMS_CAN_MO::CTRL
TM_REG32 CTRL
Message Control.
Definition: TMC_BASE_CAN.h:14
_TMS_CAN::TRS
TM_REG32 TRS
Transmit request set.
Definition: TMC_BASE_CAN.h:27
Uint64
unsigned long long Uint64
64 Bit Variable: 0 .. 18.446.744.073.709.551.615
Definition: global_defines.h:23
_TMS_CAN_MO::MDL
TM_REG32 MDL
Message Data Low.
Definition: TMC_BASE_CAN.h:15
_TMS_CAN::MO
TMS_CAN_MO MO[32]
Mailboxes.
Definition: TMC_BASE_CAN.h:55
_CanMailbox::messageLength
Uint8 messageLength
Set amount of bytes to send or receive: (0-8)
Definition: can.h:22
_CanMailbox::Message_ID
Uint32 Message_ID
Message Identifier for CAN-Mailbox (standard: 11 Bit, extended: 29 Bit)
Definition: can.h:20
_CanMailbox::direction
CAN_direction direction
Set mailbox-direction: CAN_Tx / CAN_Rx.
Definition: can.h:23
CAN_getInterface
TMPS_CAN CAN_getInterface(Uint16)
get_can_interface for matching right CANInterfaces.
Definition: can.c:523
_TMS_CAN_MO::MDH
TM_REG32 MDH
Message Data High.
Definition: TMC_BASE_CAN.h:16
_TMS_CAN
CAN Register (TMC_BASE_CANA / TMC_BASE_CANB).
Definition: TMC_BASE_CAN.h:24
_TMS_CAN::MC
TM_REG32 MC
Master control.
Definition: TMC_BASE_CAN.h:35
CAN_Rx
@ CAN_Rx
Definition: can.h:15
_TMS_CAN::TIOC
TM_REG32 TIOC
TX I/O control.
Definition: TMC_BASE_CAN.h:46
_CanMailbox::extended
Uint8 extended
Set standard/extended Identifier-Mode: (standard = 0, extended = 1)
Definition: can.h:21
_TMS_CAN_MO::ID
TM_REG32 ID
Message Identifier.
Definition: TMC_BASE_CAN.h:13
CAN_direction
enum _CAN_direction CAN_direction
The enumeration for CAN directions.
_TMS_CAN::TA
TM_REG32 TA
Transmission acknowledge.
Definition: TMC_BASE_CAN.h:29
_CanInterface::canrx
Uint16 canrx
CAN Rx GPIO.
Definition: can.h:30
_CanInterface::cantx
Uint16 cantx
CAN Tx GPIO.
Definition: can.h:31
_TMS_CAN::ME
TM_REG32 ME
Mailbox enable.
Definition: TMC_BASE_CAN.h:25
_TMS_CAN::MD
TM_REG32 MD
Mailbox direction.
Definition: TMC_BASE_CAN.h:26
_TMS_CAN::RMP
TM_REG32 RMP
Receive message pending.
Definition: TMC_BASE_CAN.h:31
_TMS_CAN::RIOC
TM_REG32 RIOC
RX I/O control.
Definition: TMC_BASE_CAN.h:47
_CanMailbox::active
Uint8 active
Activate / Deactivate mailbox: 0 = inactive, 1= active.
Definition: can.h:24
CAN_Tx
@ CAN_Tx
Definition: can.h:15
Uint32
unsigned long Uint32
32 Bit Variable: 0 .. 4.294.967.295
Definition: global_defines.h:22