cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable
        Status = CyU3PDmaChannelGetBuffer(&glCPUtoUSB_Handle, &ReportBuffer, CYU3P_WAIT_FOREVER); CheckStatus("GetReportBuffer4KeyPress", Status); // Most of this report will be 0's ReportBuffer.count = REPORT_SIZE; CyU3PMemSet(ReportBuffer.buffer, 0, REPORT_SIZE); // Convert InputChar to a Modifier and a Usage ReportBuffer.buffer[0] = Ascii2Usage[Index++]; ReportBuffer.buffer[2] = Ascii2Usage[Index]; // Send the Key Press to the host Status = CyU3PDmaChannelCommitBuffer(&glCPUtoUSB_Handle, REPORT_SIZE, 0); CheckStatus("Send KeyPress ", Status); // Wait 50msec then send a Key Release CyU3PThreadSleep(50); Status = CyU3PDmaChannelGetBuffer(&glCPUtoUSB_Handle, &ReportBuffer, CYU3P_WAIT_FOREVER); CheckStatus("GetReportBuffer4KeyRelease", Status); CyU3PMemSet(ReportBuffer.buffer, 0, REPORT_SIZE); ReportBuffer.count = REPORT_SIZE; Status = CyU3PDmaChannelCommitBuffer(&glCPUtoUSB_Handle, REPORT_SIZE, 0); CheckStatus("Send KeyRelease", Status); when I use CyU3PDmaChannelGetBuffer(API), The host can not receive data without the event of the host(usb event). I want to receive data without the event of the host pc as soon as data in Dmabuffer.   
0 Likes
Reply
1 Reply
Anonymous
Not applicable

Since USB is a master-slave protocol, you cannot send data to the PC without the PC asking for it. The best you can do is to set the endpoint transport type to interrupt or isochronous and you can expect the PC to request data at a specific rate.

0 Likes
Reply