/* The device must be stopped before setting the interframe gap. */
XStatus XEmac_SetInterframeGap(XEmac *InstancePtr, u8 Part1, u8 Part2)
/* The device must be stopped before setting the interframe gap. */
XStatus XEmac_SetInterframeGap(XEmac *InstancePtr, u8 Part1, u8 Part2)
{
	u32 Ifg;
	XASSERT_NONVOID(InstancePtr != NULL);
	XASSERT_NONVOID(Part1 < XEM_MAX_IFG);
	XASSERT_NONVOID(Part2 < XEM_MAX_IFG);
	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
	if (InstancePtr->IsStarted == XCOMPONENT_IS_STARTED) {
		return XST_DEVICE_IS_STARTED;
	}
	Ifg = Part1 << XEM_IFGP_PART1_SHIFT;
	Ifg |= (Part2 << XEM_IFGP_PART2_SHIFT);
	XIo_Out32(InstancePtr->BaseAddress + XEM_IFGP_OFFSET, Ifg);
	return XST_SUCCESS;
}