![]() |
iicps
Xilinx SDK Drivers API Documentation
|
A design example of using the IIC device as slave for interrupt-driven transfers using the external Aardvark IIC analyzer as the master.
This example uses buffer size of 250. Set the send buffer of the Aardvark device as continuous data from 0x00 to 0xF9.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a jz 01/30/10 First release
Functions | |
int | IicPsSlaveIntrExample (u16 DeviceId) |
This function does a minimal test on the Iic device and driver as a design example. More... | |
void | Handler (void *CallBackRef, u32 Event) |
This function is the handler which performs processing to handle data events from the IIC. More... | |
int | main (void) |
Main function to call the interrupt example in the slave mode. More... | |
void Handler | ( | void * | CallBackRef, |
u32 | Event | ||
) |
This function is the handler which performs processing to handle data events from the IIC.
It is called from an interrupt context such that the amount of processing performed should be minimized.
This handler provides an example of how to handle data for the IIC and is application specific.
CallBackRef | contains a callback reference from the driver, in this case it is the instance pointer for the IIC driver. |
Event | contains the specific kind of event that has occurred. |
References XIICPS_EVENT_COMPLETE_RECV.
int IicPsSlaveIntrExample | ( | u16 | DeviceId | ) |
This function does a minimal test on the Iic device and driver as a design example.
The purpose of this function is to illustrate how to use the XIicPs component.
This function sends data and expects to receive the same data through the IIC using the Aardvark test hardware.
This function uses interrupt driver mode of the IIC.
DeviceId | is the Device ID of the IicPs Device and is the XPAR_<IICPS_instance>_DEVICE_ID value from xparameters.h |
This function contains an infinite loop such that if interrupts are not working it may never return.
References XIicPs_Config::BaseAddress, XIicPs_CfgInitialize(), XIicPs_LookupConfig(), and XIicPs_SelfTest().
Referenced by main().
int main | ( | void | ) |
Main function to call the interrupt example in the slave mode.
None |
References IicPsSlaveIntrExample().