XilinxProcessorIPLib/drivers/can/src/xcan.c
void XCan_AcceptFilterEnable(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 |= FilterIndexes;
	EnabledFilters &= XCAN_AFR_UAF_ALL_MASK;

	/* Write AFR */
	XCan_WriteReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET,
			EnabledFilters);
}
/*****************************************************************************/
/**
*
* This routine enables individual acceptance filters. Up to 4 filters could
* be enabled.
*
* @param	InstancePtr is a pointer to the XCan instance to be worked on.
* @param	FilterIndexes specifies which filter(s) to enable. Use
*		any XCAN_AFR_UAF*_MASK to enable one filter, and "Or" multiple
*		XCAN_AFR_UAF*_MASK values if multiple filters need to be
*		enabled. Any filter not specified in this parameter will keep
*		its previous enable/disable setting.
*
* @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 enables individual acceptance filters. Up to 4 filters could
be enabled.
This routine enables individual acceptance filters . Up to 4 filters could be enabled .
void XCan_AcceptFilterEnable(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 |= FilterIndexes;
	EnabledFilters &= XCAN_AFR_UAF_ALL_MASK;
	XCan_WriteReg(InstancePtr->BaseAddress, XCAN_AFR_OFFSET,
			EnabledFilters);
}
void XCan_AcceptFilterEnable ( 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 |= FilterIndexes ; EnabledFilters &= XCAN_AFR_UAF_ALL_MASK ; XCan_WriteReg ( InstancePtr -> BaseAddress , XCAN_AFR_OFFSET , EnabledFilters ) ; }
This routine enables individual acceptance filters.
This routine enables 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 */