//! Registers a hot plug handle for USB device notification of any supported device. /*! * \example hot-plug-monitor.c * * \par hot-plug-monitor example: * -# Initializes a new HotK (hot-plug) handle. * -# Writes arrival/removal event notifications to console output as they occur. * -# Repeats step #2 until the \b Q key is pressed. * -# Frees the HotK (hot-plug) handle created in step #1 * \par Console Output \verbatim Initialize a HotK device notification event monitor.. Looking for devices with instances IDs matching the pattern '*'.. Press 'q' to exit.. HotK monitor initialized. ErrorCode: 00000000h [ARRIVAL] Benchmark Device (Microchip Technology, Inc.) [libusbK] InstanceID : USB\VID_04D8&PID_FA2E\LUSBW1 DeviceInterfaceGUID : {716cdf1f-418b-4b80-a07d-1311dffdc8b8} DevicePath : \\?\USB#VID_04D8&PID_FA2E#LUSBW1#{716cdf1f-418b-4b80-a07d-1311dffdc8b8} [REMOVAL] Benchmark Device (Microchip Technology, Inc.) [libusbK] InstanceID : USB\VID_04D8&PID_FA2E\LUSBW1 DeviceInterfaceGUID : {716cdf1f-418b-4b80-a07d-1311dffdc8b8} DevicePath : \\?\USB#VID_04D8&PID_FA2E#LUSBW1#{716cdf1f-418b-4b80-a07d-1311dffdc8b8} HotK monitor closed. ErrorCode: 00000000h \endverbatim */ //! Displays the connected devices that can be used by libusbK. /*! * \example show-device.c * * \par show-device example: * -# Initializes a new LstK (device list) handle. * -# Gets the number of devices contained in the device list. * -# Demonstrates using \ref LstK_FindByVidPid to locate the example VID/PID. * -# Demonstrates using \ref LstK_MoveReset and \ref LstK_MoveNext to locate the example VID/PID. * -# Demonstrates using \ref LstK_Enumerate for printing a single line description of each device list element. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim USB\VID_04D8&PID_FA2E\LUSBW1: Benchmark Device (Travis Robinson) Example device connected! \endverbatim */ //! Locates and opens a device by vid/pid. /*! * \example open-device.c * * \par open-device example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Prints pipe information. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! Pipe Information: PipeId=0x01 PipeType=0x02 Interval=0 MaximumPacketSize=32 PipeId=0x81 PipeType=0x02 Interval=0 MaximumPacketSize=32 \endverbatim */ //! Loads a dynamic driver api for use with all drivers and opens the device. /*! * \example load-driver-api.c * * \par load-driver-api example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Loads a dynamic driver API set specific to the devices driver. * -# Initializes a new UsbK (usb device) handle. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. libusbK driver api loaded! Device opened successfully! \endverbatim */ //! Configures device interface/alt settings. /*! * \example config-interface.c * * \par config-interface example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Claims the specified interface. (re-define at top of example) * -# Finds the specified interface/alt setting. (re-define at top of example) * -# Finds the specified read and write pipes. (re-define at top of example) * -# Sets the specified alternate setting as the "active" interface. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! Interface/alt setting number 00h/00h found! Read pipe 81h found! Write pipe 01h found! Alternate setting 00h selected! \endverbatim */ //! Asynchronously loops data from one endpoint to another. /*! * \example xfer-async-loop.c * * \par xfer-async-loop example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Transfers an application defined number of packets from a read pipe to a write pipe. (see example comments) * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! [Tx-001] PipeID=01h Length=512 [Tx-002] PipeID=01h Length=512 [Tx-003] PipeID=01h Length=512 [Rx-001] PipeID=81h Length=512 [Tx-004] PipeID=01h Length=512 [Rx-002] PipeID=81h Length=512 [Tx-005] PipeID=01h Length=512 [Rx-003] PipeID=81h Length=512 [Tx-006] PipeID=01h Length=512 [Rx-004] PipeID=81h Length=512 [Tx-007] PipeID=01h Length=512 [Rx-005] PipeID=81h Length=512 [Tx-008] PipeID=01h Length=512 [Rx-006] PipeID=81h Length=512 [Tx-009] PipeID=01h Length=512 [Rx-007] PipeID=81h Length=512 [Tx-010] PipeID=01h Length=512 [Rx-008] PipeID=81h Length=512 [Tx-011] PipeID=01h Length=512 [Rx-009] PipeID=81h Length=512 [Tx-012] PipeID=01h Length=512 [Rx-010] PipeID=81h Length=512 [Rx-011] PipeID=81h Length=512 [Rx-012] PipeID=81h Length=512 \endverbatim */ //! Synchronously completes an application defined number of transfers. /*! * \example xfer-sync.c * * \par xfer-sync example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Configures the benchmark test device to accept/send data. * -# Submits/Completes \c SYNC_TRANSFER_COUNT number of I/O request one at a time. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! Transfer #0 completed with 4096 bytes. Transfer #1 completed with 4096 bytes. Transfer #2 completed with 4096 bytes. Transferred 12288 bytes in 3 transfers. errorCode=00000000h \endverbatim */ //! Asynchronously submits an application defined number of transfers. /*! * \example xfer-async.c * * \par xfer-async example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Configures the benchmark test device to accept/send data. * -# Initializes a new OvlPoolK (overlapped pool) handle. * -# Submits \c ASYNC_PENDING_IO_COUNT number of I/O request. * -# Completes all I/O request submitted above. * -# Frees the UsbK (usb device) handle. * -# Frees the OvlPoolK (overlapped pool) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! Transfer #0 submitted for 4096 bytes. Transfer #1 submitted for 4096 bytes. Transfer #2 submitted for 4096 bytes. Transfer #0 completed with 4096 bytes. Transfer #1 completed with 4096 bytes. Transfer #2 completed with 4096 bytes. Transferred 12288 bytes in 3 transfers. errorCode=00000000h \endverbatim */ //! Asynchronously streams data to or from an endpoint. /*! * \example xfer-stream.c * * \par xfer-stream example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Configures the benchmark test device to accept/send data. * -# Initializes a new stream handle. * -# Starts the stream. * -# Continually transfers data until a user defined stop/start point is reached. * -# Stops and starts the stream. * -# Repeats the above two steps until a key is pressed. * -# Stops and frees the stream. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! [Init Stream] result = 00000000h [Start Stream] result = 00000000h Transferred bytes:524288 BPS:185559705.08 Transferred bytes:159744 BPS:3444001.36 Transferred bytes:159744 BPS:2128927.06 Transferred bytes:167936 BPS:1694587.83 Transferred bytes:163840 BPS:1473756.41 Transferred bytes:163840 BPS:1343928.97 Transferred bytes:167936 BPS:1259668.21 Transferred bytes:167936 BPS:1199183.22 [StreamResult] Bytes-total:1675264 Seconds-total:1.397 BPS-average:1199183.22 Transferred bytes:172032 BPS:876132.77 Transferred bytes:167936 BPS:858126.93 Transferred bytes:163840 BPS:843762.19 Transferred bytes:163840 BPS:838453.05 Transferred bytes:163840 BPS:834713.10 Transferred bytes:163840 BPS:832090.60 Transferred bytes:163840 BPS:830226.44 Transferred bytes:163840 BPS:828502.37 Transferred bytes:167936 BPS:829741.23 Transferred bytes:163840 BPS:828706.57 [StreamResult] Bytes-total:1654784 Seconds-total:1.997 BPS-average:828706.57 Transferred bytes:167936 BPS:860579.17 Transferred bytes:159744 BPS:828717.06 Transferred bytes:159744 BPS:819513.85 Transferred bytes:163840 BPS:819588.39 Transferred bytes:159744 BPS:815706.23 Transferred bytes:163840 BPS:816251.25 Transferred bytes:159744 BPS:813581.03 Transferred bytes:163840 BPS:814108.63 Transferred bytes:163840 BPS:815067.72 Transferred bytes:163840 BPS:815427.14 [StreamResult] Bytes-total:1626112 Seconds-total:1.994 BPS-average:815427.14 [Stop Stream] result = 00000000h \endverbatim */ //! Gets, sets, and tests the \c PIPE_TRANSFER_TIMEOUT policy. /*! * \example pipe-policy-timeout.c * * \par pipe-policy-timeout example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Gets the pipe transfer timeout policy value, sets it, and gets it a second time. * -# Configures the benchmark test device to not accept/send data. * -# Initializes a new OvlPoolK (overlapped pool) handle. * -# Submits transfers and estimates the compeletion timeout duration. * -# Frees the UsbK (usb device) handle. * -# Frees the OvlPoolK (overlapped pool) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! [81h] Getting Pipe-Timeout.. [81h] Pipe-Timeout is 0 [81h] Setting Pipe-Timeout to 10.. [81h] Getting Pipe-Timeout.. [81h] Pipe-Timeout is 10 [81h] Transfer-Begin #1.. [81h] Transfer-Begin #2.. [81h] Transfer-Duration: 9.66 ms [81h] Transfer-Begin #3.. [81h] Transfer-Duration: 8.94 ms [81h] Transfer-Begin #4.. [81h] Transfer-Duration: 9.24 ms \endverbatim */ //! Transfers data over an isochronous pipe at a fixed interval. /*! * \example xfer-iso.c * * \remark * This is a rough example of how to transfer data isochronously that is time sensitive. * A fixed frequency audio sample would be an example of such data. * * \par xfer-iso example: * -# Finds the first EP of a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# use "intf=" on the command line to specify a specific interface. EG: intf=0 * -# use "altf=" on the command line to specify a specific alternate setting. EG: altf=1 * -# use "ep=" on the command line to specify a specific endpoint. EG: ep=81 * -# use "logfile=" on the command line to write output to a file. EG: logfile=log.txt * -# Initializes a new UsbK (usb device) handle. * -# Selects interface by pipe id and get descriptors. * -# Sets the desired alternate setting. * -# Configures the benchmark test device to send/receive data. * -# Allocates iso buffer resources. * -# Starts transferring until an error occurs or MAX_TRANSFERS_TOTAL is reached. * -# Reports isochronous transfer packet information to log file. * -# Cancels all transfers left outstanding. * -# Frees the iso buffer resources. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle. * -# Closes log file. * * \par Console Output using CYPRESS_FX3\\BMFW_IsoSourceSink Firmware * \verbatim .\xfer-iso vid=04b4 pid=00fd ep=80 Looking for device vid/pid 04B4/00FD.. Using 04B4:00FD (6&28C5070&0&1): FX3 ISOSRCSNK - Cypress Semiconductor Corp. Device opened successfully! Device hardware fully prepared.. XFER-ISO TEST ---------------------------------------------------------- Device ID : USB\VID_04B4&PID_00FD\6&28C5070&0&1 Device Name : FX3 ISOSRCSNK Interface : 0 Alt Setting : 1 Pipe ID : 0x83 (Read) Bytes Per Interval: 24576 Interval Period : 125us #0: StartFrame=09FC72A3h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:unknown 00 01 02 03 04 05 06 07 #1: StartFrame=09FC72A4h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197377773.32 08 09 0A 0B 0C 0D 0E 0F #2: StartFrame=09FC72A5h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196274333.63 10 11 12 13 14 15 16 17 #3: StartFrame=09FC72A6h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197695324.28 18 19 1A 1B 1C 1D 1E 1F #4: StartFrame=09FC72A7h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196117705.74 20 21 22 23 24 25 26 27 #5: StartFrame=09FC72A8h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196706353.18 28 29 2A 2B 2C 2D 2E 2F #6: StartFrame=09FC72A9h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:191364609.69 30 31 32 33 34 35 36 37 #7: StartFrame=09FC72AAh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:202146822.95 38 39 3A 3B 3C 3D 3E 3F #8: StartFrame=09FC72ABh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197179821.48 40 41 42 43 44 45 46 47 #9: StartFrame=09FC72ACh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196215568.86 48 49 4A 4B 4C 4D 4E 4F #10: StartFrame=09FC72ADh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196450839.33 50 51 52 53 54 55 56 57 #11: StartFrame=09FC72AEh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196883637.09 58 59 5A 5B 5C 5D 5E 5F #12: StartFrame=09FC72AFh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196824506.96 60 61 62 63 64 65 66 67 #13: StartFrame=09FC72B0h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196254741.47 68 69 6A 6B 6C 6D 6E 6F #14: StartFrame=09FC72B1h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196667000.10 70 71 72 73 74 75 76 77 #15: StartFrame=09FC72B2h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196686674.67 78 79 7A 7B 7C 7D 7E 7F #16: StartFrame=09FC72B3h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196137270.55 80 81 82 83 84 85 86 87 #17: StartFrame=09FC72B4h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196923076.92 88 89 8A 8B 8C 8D 8E 8F #18: StartFrame=09FC72B5h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197002004.01 90 91 92 93 94 95 96 97 #19: StartFrame=09FC72B6h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196078587.81 98 99 9A 9B 9C 9D 9E 9F #20: StartFrame=09FC72B7h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197002004.01 A0 A1 A2 A3 A4 A5 A6 A7 #21: StartFrame=09FC72B8h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196765412.33 A8 A9 AA AB AC AD AE AF #22: StartFrame=09FC72B9h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195941797.89 B0 B1 B2 B3 B4 B5 B6 B7 #23: StartFrame=09FC72BAh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196962532.56 B8 B9 BA BB BC BD BE BF #24: StartFrame=09FC72BBh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196765412.33 C0 C1 C2 C3 C4 C5 C6 C7 #25: StartFrame=09FC72BCh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196176411.89 C8 C9 CA CB CC CD CE CF #26: StartFrame=09FC72BDh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197100751.88 D0 D1 D2 D3 D4 D5 D6 D7 #27: StartFrame=09FC72BEh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196627662.77 D8 D9 DA DB DC DD DE DF #28: StartFrame=09FC72BFh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192790743.28 E0 E1 E2 E3 E4 E5 E6 E7 #29: StartFrame=09FC72C0h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:198834951.46 E8 E9 EA EB EC ED EE EF #30: StartFrame=09FC72C1h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197794768.61 F0 F1 F2 F3 F4 F5 F6 F7 #31: StartFrame=09FC72C2h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196608000.00 F8 F9 FA FB FC FD FE FF #32: StartFrame=09FC72C3h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196785106.60 00 01 02 03 04 05 06 07 #33: StartFrame=09FC72C4h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196726035.62 08 09 0A 0B 0C 0D 0E 0F #34: StartFrame=09FC72C5h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196470470.67 10 11 12 13 14 15 16 17 #35: StartFrame=09FC72C6h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196765412.33 18 19 1A 1B 1C 1D 1E 1F #36: StartFrame=09FC72C7h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197041491.28 20 21 22 23 24 25 26 27 #37: StartFrame=09FC72C8h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195902750.10 28 29 2A 2B 2C 2D 2E 2F #38: StartFrame=09FC72C9h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195008926.80 30 31 32 33 34 35 36 37 #39: StartFrame=09FC72CAh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:198593939.39 38 39 3A 3B 3C 3D 3E 3F #40: StartFrame=09FC72CBh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196254741.47 40 41 42 43 44 45 46 47 #41: StartFrame=09FC72CCh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196962532.56 48 49 4A 4B 4C 4D 4E 4F #42: StartFrame=09FC72CDh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196726035.62 50 51 52 53 54 55 56 57 #43: StartFrame=09FC72CEh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192942100.10 58 59 5A 5B 5C 5D 5E 5F #44: StartFrame=09FC72CFh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:198153598.06 60 61 62 63 64 65 66 67 #45: StartFrame=09FC72D0h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:198493690.06 68 69 6A 6B 6C 6D 6E 6F #46: StartFrame=09FC72D1h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196588341.17 70 71 72 73 74 75 76 77 #47: StartFrame=09FC72D2h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196923076.92 78 79 7A 7B 7C 7D 7E 7F #48: StartFrame=09FC72D3h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196785106.60 80 81 82 83 84 85 86 87 #49: StartFrame=09FC72D4h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196195988.42 88 89 8A 8B 8C 8D 8E 8F #50: StartFrame=09FC72D5h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197160048.13 90 91 92 93 94 95 96 97 #51: StartFrame=09FC72D6h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195941797.89 98 99 9A 9B 9C 9D 9E 9F #52: StartFrame=09FC72D7h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196647329.47 A0 A1 A2 A3 A4 A5 A6 A7 #53: StartFrame=09FC72D8h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196923076.92 A8 A9 AA AB AC AD AE AF #54: StartFrame=09FC72D9h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 B0 B1 B2 B3 B4 B5 B6 B7 #55: StartFrame=09FC72DAh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 B8 B9 BA BB BC BD BE BF #56: StartFrame=09FC72DBh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196785106.60 C0 C1 C2 C3 C4 C5 C6 C7 #57: StartFrame=09FC72DCh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196608000.00 C8 C9 CA CB CC CD CE CF #58: StartFrame=09FC72DDh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196765412.33 D0 D1 D2 D3 D4 D5 D6 D7 #59: StartFrame=09FC72DEh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:193074732.40 D8 D9 DA DB DC DD DE DF #60: StartFrame=09FC72DFh TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:200313805.40 E0 E1 E2 E3 E4 E5 E6 E7 #61: StartFrame=09FC72E0h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195396541.44 E8 E9 EA EB EC ED EE EF #62: StartFrame=09FC72E1h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197417411.39 F0 F1 F2 F3 F4 F5 F6 F7 #63: StartFrame=09FC72E2h TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197100751.88 F8 F9 FA FB FC FD FE FF Done! \endverbatim */ //! Transfers data over an isochronous pipe as soon as possible (ASAP). /*! * \example xfer-iso-asap.c * * \remark * This is a rough example of how to transfer data isochronously as fast as possible. * Real-time telemetry would be an example of such data. * * \par xfer-iso-asap example: * -# Finds the first EP of a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# use "intf=" on the command line to specify a specific interface. EG: intf=0 * -# use "altf=" on the command line to specify a specific alternate setting. EG: altf=1 * -# use "ep=" on the command line to specify a specific endpoint. EG: ep=81 * -# use "logfile=" on the command line to write output to a file. EG: logfile=log.txt * -# Initializes a new UsbK (usb device) handle. * -# Selects interface by pipe id and get descriptors. * -# Sets the desired alternate setting. * -# Configures the benchmark test device to send/receive data. * -# Allocates iso buffer resources. * -# Starts transferring until an error occurs or MAX_TRANSFERS_TOTAL is reached. * -# Reports isochronous transfer packet information to log file. * -# Cancels all transfers left outstanding. * -# Frees the iso buffer resources. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle. * -# Closes log file. * * \par Console Output using CYPRESS_FX3\\BMFW_IsoSourceSink Firmware * \verbatim .\xfer-iso-asap vid=04b4 pid=00fd ep=80 Looking for device vid/pid 04B4/00FD.. Using 04B4:00FD (6&28C5070&0&1): FX3 ISOSRCSNK - Cypress Semiconductor Corp. Device opened successfully! Device hardware fully prepared.. XFER-ISO TEST ---------------------------------------------------------- Device ID : USB\VID_04B4&PID_00FD\6&28C5070&0&1 Device Name : FX3 ISOSRCSNK Interface : 0 Alt Setting : 1 Pipe ID : 0x83 (Read) Bytes Per Interval: 24576 Interval Period : 125us #0: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:unknown 00 01 02 03 04 05 06 07 #1: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197357960.25 08 09 0A 0B 0C 0D 0E 0F #2: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196333133.61 10 11 12 13 14 15 16 17 #3: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197219380.08 18 19 1A 1B 1C 1D 1E 1F #4: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196000398.76 20 21 22 23 24 25 26 27 #5: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197595979.90 28 29 2A 2B 2C 2D 2E 2F #6: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196372353.18 30 31 32 33 34 35 36 37 #7: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196549035.29 38 39 3A 3B 3C 3D 3E 3F #8: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192885313.45 40 41 42 43 44 45 46 47 #9: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:200436333.98 48 49 4A 4B 4C 4D 4E 4F #10: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196450839.33 50 51 52 53 54 55 56 57 #11: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196706353.18 58 59 5A 5B 5C 5D 5E 5F #12: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196568686.26 60 61 62 63 64 65 66 67 #13: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196863923.10 68 69 6A 6B 6C 6D 6E 6F #14: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196274333.63 70 71 72 73 74 75 76 77 #15: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196706353.18 78 79 7A 7B 7C 7D 7E 7F #16: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196667000.10 80 81 82 83 84 85 86 87 #17: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196667000.10 88 89 8A 8B 8C 8D 8E 8F #18: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196588341.17 90 91 92 93 94 95 96 97 #19: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196726035.62 98 99 9A 9B 9C 9D 9E 9F #20: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196726035.62 A0 A1 A2 A3 A4 A5 A6 A7 #21: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196490105.94 A8 A9 AA AB AC AD AE AF #22: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196235153.21 B0 B1 B2 B3 B4 B5 B6 B7 #23: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192356912.24 B8 B9 BA BB BC BD BE BF #24: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196352741.44 C0 C1 C2 C3 C4 C5 C6 C7 #25: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:201215842.80 C8 C9 CA CB CC CD CE CF #26: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196923076.92 D0 D1 D2 D3 D4 D5 D6 D7 #27: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196352741.44 D8 D9 DA DB DC DD DE DF #28: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196824506.96 E0 E1 E2 E3 E4 E5 E6 E7 #29: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196962532.56 E8 E9 EA EB EC ED EE EF #30: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196411588.41 F0 F1 F2 F3 F4 F5 F6 F7 #31: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196333133.61 F8 F9 FA FB FC FD FE FF #32: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197002004.01 00 01 02 03 04 05 06 07 #33: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 08 09 0A 0B 0C 0D 0E 0F #34: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196235153.21 10 11 12 13 14 15 16 17 #35: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197219380.08 18 19 1A 1B 1C 1D 1E 1F #36: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196824506.96 20 21 22 23 24 25 26 27 #37: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195922272.05 28 29 2A 2B 2C 2D 2E 2F #38: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192885313.45 30 31 32 33 34 35 36 37 #39: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:201030674.85 38 39 3A 3B 3C 3D 3E 3F #40: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195454816.58 40 41 42 43 44 45 46 47 #41: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195513126.49 48 49 4A 4B 4C 4D 4E 4F #42: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:198794742.16 50 51 52 53 54 55 56 57 #43: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196274333.63 58 59 5A 5B 5C 5D 5E 5F #44: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196804804.80 60 61 62 63 64 65 66 67 #45: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197021745.67 68 69 6A 6B 6C 6D 6E 6F #46: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:195805198.69 70 71 72 73 74 75 76 77 #47: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197298544.91 78 79 7A 7B 7C 7D 7E 7F #48: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196529388.24 80 81 82 83 84 85 86 87 #49: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196411588.41 88 89 8A 8B 8C 8D 8E 8F #50: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196647329.47 90 91 92 93 94 95 96 97 #51: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 98 99 9A 9B 9C 9D 9E 9F #52: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196391968.83 A0 A1 A2 A3 A4 A5 A6 A7 #53: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196962532.56 A8 A9 AA AB AC AD AE AF #54: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:192771840.38 B0 B1 B2 B3 B4 B5 B6 B7 #55: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197695324.28 B8 B9 BA BB BC BD BE BF #56: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197735090.01 C0 C1 C2 C3 C4 C5 C6 C7 #57: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197278747.74 C8 C9 CA CB CC CD CE CF #58: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197377773.32 D0 D1 D2 D3 D4 D5 D6 D7 #59: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197061240.85 D8 D9 DA DB DC DD DE DF #60: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 E0 E1 E2 E3 E4 E5 E6 E7 #61: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196509745.13 E8 E9 EA EB EC ED EE EF #62: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:197199598.80 F0 F1 F2 F3 F4 F5 F6 F7 #63: TransferLength=196608 GoodPackets=8, BadPackets=0, BPS-average:196391968.83 F8 F9 FA FB FC FD FE FF Done! \endverbatim */ //! Enables auto suspend, sets suspend timeout and transfers synchronously. /*! * \example power-policy-suspend.c * * \par power-policy-suspend example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Gets the \b AUTO_SUSPEND and the \b SUSPEND_DELAY power policy values. * -# Toggles the \b AUTO_SUSPEND power policy value. * -# If \b AUTO_SUSPEND was enabled in the previous step, the \b SUSPEND_DELAY power policy is changed to a different value. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim RUN #1 Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. [NOTE] If the DeviceIdleEnabled policy is not set in the .inf file when the device is installed, the AUTO_SUSPEND policy will be ignored. Device opened successfully! AUTO_SUSPEND is currently enabled. SUSPEND_DELAY is set to 5000 ms Set AUTO_SUSPEND = Off. RUN #2 Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. [NOTE] If the DeviceIdleEnabled policy is not set in the .inf file when the device is installed, the AUTO_SUSPEND policy will be ignored. Device opened successfully! AUTO_SUSPEND is currently disabled. Set AUTO_SUSPEND = On. Set SUSPEND_DELAY = 10000 ms RUN #3 Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. [NOTE] If the DeviceIdleEnabled policy is not set in the .inf file when the device is installed, the AUTO_SUSPEND policy will be ignored. Device opened successfully! AUTO_SUSPEND is currently enabled. SUSPEND_DELAY is set to 10000 ms Set AUTO_SUSPEND = Off. RUN #4 Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. [NOTE] If the DeviceIdleEnabled policy is not set in the .inf file when the device is installed, the AUTO_SUSPEND policy will be ignored. Device opened successfully! AUTO_SUSPEND is currently disabled. Set AUTO_SUSPEND = On. Set SUSPEND_DELAY = 100 ms \endverbatim */ //!Sends various vendor specific control requests synchronously. /*! * \example xfer-control.c * * \par xfer-control example: * -# Finds a device by vid/pid (use vid=hhhh, pid=hhhhh and the command line). * -# Initializes a new UsbK (usb device) handle. * -# Sends a control request for the device descriptor. * -# Sends a vendor-specific HostToDevice request to set the benchmark vendor buffer. * -# Sends a vendor-specific DeviceToHost request to get the benchmark vendor buffer. * -# Compares and reports before and after results of the benchmark vendor buffer. * -# Frees the UsbK (usb device) handle. * -# Frees the LstK (device list) handle created in step #1. * * \par Console Output * \verbatim Looking for device vid/pid 04D8/FA2E.. Using 04D8:FA2E (LUSBW1): Benchmark Device - Microchip Technology, Inc. Device opened successfully! vendorBuffer: ABC=ABC \endverbatim */