![]() |
usbpsu
Xilinx SDK Drivers API Documentation
|
This file implements keyboard example.
requirement zcu102 board in usb device mode, connected with host using USB 3.0 cable
Following other files require to run this example o xusb_ch9.c, xusb_ch9.h o xusb_freertos_ch9_keyboard.c, xusb_freerots_ch9_keyboard.h o xusb_freertos_class_keyboard.c, xusb_freertos_class_keyboard.h
o on success example will be detected as keyboard on host o start hexdump <hid node>=""> on host o press key on board serial o key should be detcted on host
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 rb 22/03/18 First release 1.5 vak 03/25/19 Fixed incorrect data_alignment pragma directive for IAR
Functions | |
void | Usb_EpInHandler (void *CallBackRef, u32 RequestedBytes, u32 BytesTxed) |
This function is IN Endpoint handler/Callback called by driver when data is sent. More... | |
void | SetupInterruptSystem (struct XUsbPsu *InstancePtr, u16 UsbIntrId) |
This function setups the interrupt system such that interrupts can occur. More... | |
int | main (void) |
This function is the main function of the USB keyboard example. More... | |
int main | ( | void | ) |
This function is the main function of the USB keyboard example.
None. |
void SetupInterruptSystem | ( | struct XUsbPsu * | InstancePtr, |
u16 | UsbIntrId | ||
) |
This function setups the interrupt system such that interrupts can occur.
This function is application specific since the actual system may or may not have an interrupt controller. The USB controller could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.
InstPtr | is a pointer to the XUsbPsu instance. |
UsbIntrId | is the interrupt ID of the USB controller |
References SetupInterruptSystem(), XUsbPsu_EnableIntr(), and XUsbPsu_IntrHandler().
void Usb_EpInHandler | ( | void * | CallBackRef, |
u32 | RequestedBytes, | ||
u32 | BytesTxed | ||
) |
This function is IN Endpoint handler/Callback called by driver when data is sent.
CallBackRef | is pointer to Usb_DevData instance. |
RequestedBytes | is number of bytes requested to send. |
BytesTxed | is actual number of bytes sent to Host. |