XilinxProcessorIPLib/drivers/can/src/xcan.c
void XCan_AcceptFilterDisable(XCan *InstancePtr, u32 FilterIndexes)
{
	u32 EnabledFilters;

	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(InstancePtr->NumOfAcceptFilters > 0);

	/*
	 * Read the currently enabled filters from Acceptance Filter
	 * Register(AFR), which defines which filters are enabled/disabled.
	 */
	EnabledFilters =
		XCan_ReadReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET);

	/* Calculate new value to write to AFR */
	EnabledFilters &= XCAN_AFR_UAF_ALL_MASK & (~FilterIndexes);

	/* Write AFR */
	XCan_WriteReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET,
			EnabledFilters);
}
/*****************************************************************************/
/**
*
* This routine disables individual acceptance filters. Up to 4 filters could
* be disabled. If all acceptance filters are disabled then all received frames
* are stored in the RX FIFO.
*
* @param	InstancePtr is a pointer to the XCan instance to be worked on.
* @param	FilterIndexes specifies which filter(s) to disable. Use
*		any XCAN_AFR_UAF*_MASK to disable one filter, and "Or" multiple
*		XCAN_AFR_UAF*_MASK values if multiple filters need to be
*		disabled. Any filter not specified in this parameter will keep
*		its previous enable/disable setting. If all acceptance filters
*		are disabled then all received frames are stored in the RX FIFO.
*
* @return	None.
*
* @note
*
* Acceptance Filter Register is an optional register in Xilinx CAN device.
* If it is NOT existing in the device, this function should NOT be used.
* Calling this function in this case will cause an assertion failure.
*
******************************************************************************/
This routine disables individual acceptance filters. Up to 4 filters could
be disabled. If all acceptance filters are disabled then all received frames
are stored in the RX FIFO.
This routine disables individual acceptance filters . Up to 4 filters could be disabled . If all acceptance filters are disabled then all received frames are stored in the RX FIFO .
void XCan_AcceptFilterDisable(XCan *InstancePtr, u32 FilterIndexes)
{
	u32 EnabledFilters;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(InstancePtr->NumOfAcceptFilters > 0);
	EnabledFilters =
		XCan_ReadReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET);
	EnabledFilters &= XCAN_AFR_UAF_ALL_MASK & (~FilterIndexes);
	XCan_WriteReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET,
			EnabledFilters);
}
void XCan_AcceptFilterDisable ( XCan * InstancePtr , u32 FilterIndexes ) { u32 EnabledFilters ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( InstancePtr -> NumOfAcceptFilters > 0 ) ; EnabledFilters = XCan_ReadReg ( InstancePtr -> BaseAddress , XCAN_AFR_OFFSET ) ; EnabledFilters &= XCAN_AFR_UAF_ALL_MASK & ( ~ FilterIndexes ) ; XCan_WriteReg ( InstancePtr -> BaseAddress , XCAN_AFR_OFFSET , EnabledFilters ) ; }
This routine disables individual acceptance filters.
This routine disables individual acceptance filters .
/*
	 * Read the currently enabled filters from Acceptance Filter
	 * Register(AFR), which defines which filters are enabled/disabled.
	 */ /* Calculate new value to write to AFR */ /* Write AFR */