/* CAN initialization function. 
Enables CAN peripheral, clocks and initializes CAN driver  */
void CAN_0_init(void)
/* CAN initialization function. 
Enables CAN peripheral, clocks and initializes CAN driver  */
void CAN_0_init(void)
{
	hri_mclk_set_AHBMASK_CAN1_bit(MCLK);
	hri_gclk_write_PCHCTRL_reg(GCLK, CAN1_GCLK_ID, CONF_GCLK_CAN1_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
	can_async_init(&CAN_0, CAN1);
	CAN_0_PORT_init();
}