UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
266 Views
Registered: ‎10-16-2018

Xil_AssertNonvoid macro ?

Jump to solution

Hi,

I am trying to solve an issue.

I think I have to understand this function at first: 

 

u32 XIOModule_DiscreteRead(XIOModule * InstancePtr, unsigned Channel)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((Channel >= 1) && (Channel <= XGPI_DEVICE_COUNT));

	return XIOModule_ReadReg(InstancePtr->BaseAddress,
			((Channel - 1) * XGPI_CHAN_OFFSET) + XGPI_DATA_OFFSET);
}

What is purpose of this macro Xil_AssertNonvoid ?

Kindly, I attached my SDK files.

Thanks.

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
210 Views
Registered: ‎10-21-2010

Re: Xil_AssertNonvoid macro ?

Jump to solution

This macro is used to ensure that the condition/expression specified as an argument is true. For example, the first instance makes sure that InstancePtr is not NULL, otherwise it raises a failure

1 Reply
Xilinx Employee
Xilinx Employee
211 Views
Registered: ‎10-21-2010

Re: Xil_AssertNonvoid macro ?

Jump to solution

This macro is used to ensure that the condition/expression specified as an argument is true. For example, the first instance makes sure that InstancePtr is not NULL, otherwise it raises a failure