XilinxProcessorIPLib/drivers/iic/examples/xiic_multi_master_example.c
static void StatusHandler(XIic *InstancePtr, int Event)
{
	if (Event == XII_ARB_LOST_EVENT) {
		XIic_WriteReg(InstancePtr->BaseAddress, XIIC_CR_REG_OFFSET,
				   XIIC_CR_ENABLE_DEVICE_MASK);
		XIic_WriteIisr(InstancePtr->BaseAddress, XIIC_INTR_BNB_MASK);
		XIic_WriteIier(InstancePtr->BaseAddress, XIIC_INTR_BNB_MASK);
		InstancePtr->BNBOnly = TRUE;
	}
	else if (Event == XII_BUS_NOT_BUSY_EVENT) {
		XIic_WriteReg(InstancePtr->BaseAddress, XIIC_CR_REG_OFFSET,
				   0x0);
		BusNotBusy = 1;
	}
}
/*****************************************************************************/
/**
* The Status handler is called asynchronously from an interrupt context and
* indicates the events that have occurred.
*
* @param	InstancePtr is a pointer to the IIC driver instance for which
* 		the handler is being called for.
* @param	Event indicates the condition that has occurred.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
The Status handler is called asynchronously from an interrupt context and
indicates the events that have occurred.
The Status handler is called asynchronously from an interrupt context and indicates the events that have occurred .
static void StatusHandler(XIic *InstancePtr, int Event)
{
	if (Event == XII_ARB_LOST_EVENT) {
		XIic_WriteReg(InstancePtr->BaseAddress, XIIC_CR_REG_OFFSET,
				   XIIC_CR_ENABLE_DEVICE_MASK);
		XIic_WriteIisr(InstancePtr->BaseAddress, XIIC_INTR_BNB_MASK);
		XIic_WriteIier(InstancePtr->BaseAddress, XIIC_INTR_BNB_MASK);
		InstancePtr->BNBOnly = TRUE;
	}
	else if (Event == XII_BUS_NOT_BUSY_EVENT) {
		XIic_WriteReg(InstancePtr->BaseAddress, XIIC_CR_REG_OFFSET,
				   0x0);
		BusNotBusy = 1;
	}
}
static void StatusHandler ( XIic * InstancePtr , int Event ) { if ( Event == XII_ARB_LOST_EVENT ) { XIic_WriteReg ( InstancePtr -> BaseAddress , XIIC_CR_REG_OFFSET , XIIC_CR_ENABLE_DEVICE_MASK ) ; XIic_WriteIisr ( InstancePtr -> BaseAddress , XIIC_INTR_BNB_MASK ) ; XIic_WriteIier ( InstancePtr -> BaseAddress , XIIC_INTR_BNB_MASK ) ; InstancePtr -> BNBOnly = TRUE ; } else if ( Event == XII_BUS_NOT_BUSY_EVENT ) { XIic_WriteReg ( InstancePtr -> BaseAddress , XIIC_CR_REG_OFFSET , 0x0 ) ; BusNotBusy = 1 ; } }
The Status handler is called asynchronously from an interrupt context and
indicates the events that have occurred.
The Status handler is called asynchronously from an interrupt context and indicates the events that have occurred .