XilinxProcessorIPLib/drivers/canps/examples/xcanps_watermark_intr_example.c
static void Config(XCanPs *InstancePtr)
{
	/*
	 * Enter Configuration Mode if the device is not currently in
	 * Configuration Mode.
	 */
	XCanPs_EnterMode(InstancePtr, XCANPS_MODE_CONFIG);
	while(XCanPs_GetMode(InstancePtr) != XCANPS_MODE_CONFIG);

	/*
	 * Setup Baud Rate Prescaler Register (BRPR) and
	 * Bit Timing Register (BTR) .
	 */
	XCanPs_SetBaudRatePrescaler(InstancePtr, TEST_BRPR_BAUD_PRESCALAR);
	XCanPs_SetBitTiming(InstancePtr, TEST_BTR_SYNCJUMPWIDTH,
					TEST_BTR_SECOND_TIMESEGMENT,
					TEST_BTR_FIRST_TIMESEGMENT);

	/*
	 * Set the threshold value for the Rx FIFO Watermark interrupt.
	 */
	XCanPs_SetRxIntrWatermark(InstancePtr, TEST_THRESHOLD - 1);
	XCanPs_SetTxIntrWatermark(InstancePtr, TEST_THRESHOLD - 1);
}
/*****************************************************************************/
/**
*
* This function configures CAN device. Baud Rate Prescaler Register (BRPR),
* Bit Timing Register (BTR) and RXFIFO Watermark Interrupt Register (RXWIR)
* are set in this function.
*
* @param	InstancePtr is a pointer to the driver instance.
*
* @return	None.
*
* @note		If the CAN device is not working correctly, this function may
*		enter an infinite loop and will never return to the caller.
*
******************************************************************************/
This function configures CAN device. Baud Rate Prescaler Register (BRPR),
Bit Timing Register (BTR) and RXFIFO Watermark Interrupt Register (RXWIR)
are set in this function.
This function configures CAN device . Baud Rate Prescaler Register ( BRPR ) Bit Timing Register ( BTR ) and RXFIFO Watermark Interrupt Register ( RXWIR ) are set in this function .
static void Config(XCanPs *InstancePtr)
{
	XCanPs_EnterMode(InstancePtr, XCANPS_MODE_CONFIG);
	while(XCanPs_GetMode(InstancePtr) != XCANPS_MODE_CONFIG);
	XCanPs_SetBaudRatePrescaler(InstancePtr, TEST_BRPR_BAUD_PRESCALAR);
	XCanPs_SetBitTiming(InstancePtr, TEST_BTR_SYNCJUMPWIDTH,
					TEST_BTR_SECOND_TIMESEGMENT,
					TEST_BTR_FIRST_TIMESEGMENT);
	XCanPs_SetRxIntrWatermark(InstancePtr, TEST_THRESHOLD - 1);
	XCanPs_SetTxIntrWatermark(InstancePtr, TEST_THRESHOLD - 1);
}
static void Config ( XCanPs * InstancePtr ) { XCanPs_EnterMode ( InstancePtr , XCANPS_MODE_CONFIG ) ; while ( XCanPs_GetMode ( InstancePtr ) != XCANPS_MODE_CONFIG ) ; XCanPs_SetBaudRatePrescaler ( InstancePtr , TEST_BRPR_BAUD_PRESCALAR ) ; XCanPs_SetBitTiming ( InstancePtr , TEST_BTR_SYNCJUMPWIDTH , TEST_BTR_SECOND_TIMESEGMENT , TEST_BTR_FIRST_TIMESEGMENT ) ; XCanPs_SetRxIntrWatermark ( InstancePtr , TEST_THRESHOLD - 1 ) ; XCanPs_SetTxIntrWatermark ( InstancePtr , TEST_THRESHOLD - 1 ) ; }
This function configures CAN device.
This function configures CAN device .
/*
	 * Enter Configuration Mode if the device is not currently in
	 * Configuration Mode.
	 */ /*
	 * Setup Baud Rate Prescaler Register (BRPR) and
	 * Bit Timing Register (BTR) .
	 */ /*
	 * Set the threshold value for the Rx FIFO Watermark interrupt.
	 */