/* You can check if FDCAN block is in INIT mode or it is started using fdcan_get_init_state. */
int fdcan_init(uint32_t canport, uint32_t timeout)
/* You can check if FDCAN block is in INIT mode or it is started using fdcan_get_init_state. */
int fdcan_init(uint32_t canport, uint32_t timeout)
{
	if (fdcan_cccr_init_cfg(canport, true, timeout) != 0) {
		return FDCAN_E_TIMEOUT;
	}
	FDCAN_CCCR(canport) |= FDCAN_CCCR_CCE;
	return FDCAN_E_OK;
}