stm32f7: Add the option to include RTR in CAN header
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
parent
f6039bbfa7
commit
7a346bee26
@ -1288,8 +1288,11 @@ static int stm32can_send(FAR struct can_dev_s *dev,
|
||||
}
|
||||
|
||||
#else
|
||||
regval &= ~CAN_TIR_STID_MASK;
|
||||
regval |= (uint32_t)msg->cm_hdr.ch_id << CAN_TIR_STID_SHIFT;
|
||||
regval |= ( ( (uint32_t) msg->cm_hdr.ch_id << CAN_TIR_STID_SHIFT) & CAN_TIR_STID_MASK );
|
||||
|
||||
#ifdef CONFIG_CAN_USE_RTR
|
||||
regval |= (msg->cm_hdr.ch_rtr ? CAN_TIR_RTR : 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
stm32can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval);
|
||||
|
@ -128,6 +128,12 @@ config CAN_NPOLLWAITERS
|
||||
---help---
|
||||
The maximum number of threads that may be waiting on the
|
||||
poll method.
|
||||
|
||||
config CAN_USE_RTR
|
||||
bool "Include RTR in CAN header"
|
||||
default n
|
||||
---help---
|
||||
This selection includes RTR bitfield in the CAN header.
|
||||
|
||||
comment "CAN Bus Controllers:"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user