cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
690 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
Highlighted
Xilinx Employee
Xilinx Employee
634 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

View solution in original post

1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
635 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

View solution in original post