![]() |
canps
Xilinx SDK Drivers API Documentation
|
Contains an example of how to use the XCanPs driver directly.
This example shows the usage of the driver/device in interrupt mode.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a xd/sv 01/12/10 First release 2.1 adk 23/08/14 Fixed CR:798792 Peripheral test for CANPS IP in SDK claims a 40kbps baud rate but it's not. 3.1 mus 01/14/16 Added support for intc interrupt controller
Functions | |
int | CanPsIntrExample (INTC *IntcInstPtr, XCanPs *CanInstPtr, u16 CanDeviceId, u16 CanIntrId) |
The main entry point for showing the XCanPs driver in interrupt mode. More... | |
int | main () |
This function is the main function of the Can interrupt example. More... | |
int CanPsIntrExample | ( | INTC * | IntcInstPtr, |
XCanPs * | CanInstPtr, | ||
u16 | CanDeviceId, | ||
u16 | CanIntrId | ||
) |
The main entry point for showing the XCanPs driver in interrupt mode.
The example configures the device for internal loop back mode, then sends a CAN frame and receives the same CAN frame.
IntcInstPtr | is a pointer to the instance of the INTC driver. |
CanInstPtr | is a pointer to the instance of the CAN driver which is going to be connected to the interrupt controller. |
CanDeviceId | is the device Id of the CAN device and is typically XPAR_<CANPS_instance>_DEVICE_ID value from xparameters.h. |
CanIntrId | is the interrupt Id and is typically XPAR_<CANPS_instance>_INTR value from xparameters.h. |
Referenced by main().
int main | ( | ) |
This function is the main function of the Can interrupt example.
None. |
References CanPsIntrExample().