5/24/2023 0 Comments Win usb setup![]() SetupPacket.Value = USB_DEVICE_DESCRIPTOR_TYPE << 8 SetupPacket.Request = USB_REQUEST_GET_DESCRIPTOR SetupPacket.Index = 0 // specify WinUSBComm interface SetupPacket.Request = byWinUSBCommControl SetupPacket.RequestType = (BMREQUEST_HOST_TO_DEVICE << 7)/* | (BMREQUEST_VENDOR << 5) | BMREQUEST_TO_INTERFACE*/ ZeroMemory(&SetupPacket, sizeof(WINUSB_SETUP_PACKET)) cat files for my device and installed the driver BOOL SendDatatoDefaultEndpoint(WINUSB_INTERFACE_HANDLE hDeviceHandle, BYTE byWinUSBCommControl, BYTE *pbyData = NULL, WORD wNumBytesCount = 0) How can I get my windows application to send and receive data from the STM32? I made some changes that solved the problem for receiving the data from the default end point but the issue remains when trying to send data to it. ![]() The program keeps returning an error code 31 at the WinUsb_ControlTransfer function call. I am trying to use the found-bits project to communicate with my STM32F103 via USB from a Windows application with no success.
0 Comments
Leave a Reply. |