/* Returns a pointer to an TX FIFO element in message RAM */
struct fdcan_tx_buffer_element* fdcan_get_txbuf_addr(uint32_t canport, unsigned element_id)
/* Returns a pointer to an TX FIFO element in message RAM */
struct fdcan_tx_buffer_element* fdcan_get_txbuf_addr(uint32_t canport, unsigned element_id)
{
	struct fdcan_tx_buffer_element *rxfifo = (struct fdcan_tx_buffer_element *)
		(CAN_MSG_BASE + FDCAN_TXBUF_OFFSET(canport)
		 + (element_id * fdcan_get_txbuf_element_size(canport))
		 );
	return rxfifo;
}