/* Obtains value of entry length in transmit queue/FIFO. This value covers both fixed-sized frame header block and payload buffer. User can configure payload buffer size. */
unsigned fdcan_get_txbuf_element_size(uint32_t canport)
/* Obtains value of entry length in transmit queue/FIFO. This value covers both fixed-sized frame header block and payload buffer. User can configure payload buffer size. */
unsigned fdcan_get_txbuf_element_size(uint32_t canport)
{
	unsigned element_size;
	element_size = (FDCAN_TXESC(canport) >> FDCAN_TXESC_TBDS_SHIFT) & FDCAN_TXESC_TBDS_MASK;
	return 8 + fdcan_dlc_to_length((element_size & FDCAN_TXESC_TBDS_MASK) | 0x8);
}