/* Returns a pointer to an RX FIFO element in message RAM */
struct fdcan_rx_fifo_element* fdcan_get_rxfifo_addr(uint32_t canport, unsigned fifo_id, unsigned element_id)
/* Returns a pointer to an RX FIFO element in message RAM */
struct fdcan_rx_fifo_element* fdcan_get_rxfifo_addr(uint32_t canport, unsigned fifo_id, unsigned element_id)
{
	struct fdcan_rx_fifo_element *rxfifo = (struct fdcan_rx_fifo_element *)
		(CAN_MSG_BASE + FDCAN_RXFIFO_OFFSET(canport, fifo_id)
		 + (element_id * fdcan_get_fifo_element_size(canport, fifo_id))
		 );
	return rxfifo;
}