libusb

openocd+stlink

拥有回忆 提交于 2020-11-09 14:19:41
joe @joe-PC /cygdrive/g/dapjtag/openocd-20200729/OpenOCD-20200729-0.10.0/share/openocd/scripts $ openocd -f ./board/st_nucleo_f103rb.cfg Open On-Chip Debugger 0.10.0 (2020-07-29) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : Listening on port 6666 for tcl connections Info :

奥比中光Astra Pro在ROS系统中的使用

纵饮孤独 提交于 2020-08-09 22:29:13
奥比中光Astra Pro在ROS系统中的使用 上一次介绍了Astra Pro在ubuntu中的使用,由于Astra Pro使用uvc传输彩色图像,所以当用rqt_image_view窗口 时,看不到彩色图。需要安装libuvc和libuvc_ros。 安装ROS功能包 1 sudo apt- get install ros-kinetic-astra-camera ros-kinetic-astra-launch 使用命令 1 roslaunch astra_launch astra.luanch libuvc的安装 1 cd ~ 2 git clone https: // github.com/ktossell/libuvc 3 cd libuvc 4 mkdir build 5 cd build 6 cmake .. 7 make && sudo make install libuvc_ros的安装 1 cd ~/catkin_ws/ src 2 git clone https: // github.com/ktossell/libuvc_ros 3 cd .. 4 catkin_make 编译错误及解决办法 提示找不到JpegPkg这个库。 我换回了旧版本的linuvc和libuvc_ros安装包,解决了这个问题。下载地址: https://i.cnblogs.com

Performance issue after migrating from codeless KEXT to DEXT

混江龙づ霸主 提交于 2020-08-08 06:08:32
问题 I am working on migrating a codeless KEXT to DriverKit. It is used to disable the IOKit HID driver for USB devices that present themselves as HID compliant in firmware upgrade mode. So far I have managed to match an empty subclass of IOService to the relevant devices. Here's an example of the IOKitPersonalities entries I'm using: <dict> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleIdentifierKernel</key> <string>com.apple.kpi.iokit</string> <key

Performance issue after migrating from codeless KEXT to DEXT

无人久伴 提交于 2020-08-08 06:08:11
问题 I am working on migrating a codeless KEXT to DriverKit. It is used to disable the IOKit HID driver for USB devices that present themselves as HID compliant in firmware upgrade mode. So far I have managed to match an empty subclass of IOService to the relevant devices. Here's an example of the IOKitPersonalities entries I'm using: <dict> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleIdentifierKernel</key> <string>com.apple.kpi.iokit</string> <key

libusb_bulk_transfer 异步同步

吃可爱长大的小学妹 提交于 2020-04-27 18:14:11
同步方式 libusb_bulk_transfer(devh, ep_bulk, buf, CAM_BUF_SZ, &len, timeout); 进入libusb研究,发现libusb是采用异步方式来实现的。在do_sync_bulk_transfer中: static int do_sync_bulk_transfer ( struct libusb_device_handle * dev_handle , unsigned char endpoint , unsigned char * buffer , int length , int * transferred , unsigned int timeout , unsigned char type ) { libusb_fill_bulk_transfer ( transfer , dev_handle , endpoint , buffer , length , bulk_transfer_cb , & completed , timeout ); transfer -> type = type ; r = libusb_submit_transfer ( transfer ); if ( r < 0 ) { libusb_free_transfer ( transfer ); return r ; } while (!

libusb中的热插拔使用举例

假装没事ソ 提交于 2020-04-27 17:58:18
以下为判断usb设备是插入还是拔出状态(热插拔)的测试代码: 在Windows下是不支持的,在Linux是支持的,下一个版本可能会支持Windows下的热插拔: #include <chrono> #include <thread> #include <iostream> #include <libusb.h> namespace { bool running = true; int LIBUSB_CALL hotplug_callback(libusb_context* ctx, libusb_device* dev, libusb_hotplug_event event, void* user_data) { struct libusb_device_descriptor desc; int ret = libusb_get_device_descriptor(dev, &desc); if (LIBUSB_SUCCESS != ret) { fprintf(stderr, "fail to get device descriptor: %d, %s\n", ret, libusb_error_name(ret)); //return -1; } if (event == LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED) fprintf(stdout,

ControlTransfer instruction not sending value parameter from setup packetr in LibUsbDotNet

戏子无情 提交于 2020-04-14 06:25:12
问题 I have a USB device that I need to be able to talk to from a .net application. The device is not a standard HID device and in order to initilise it I've been given a trace of packets from a USB Protocol Analyser / Sniffer for the packets used when intialising it on another type of machine. I need to replicate this packet sequence from my .net application to initialise the device. Everything is working well until I get to a particular control transfer packet / class type request. The trace I

PyUSB: reading from a USB device

帅比萌擦擦* 提交于 2020-03-04 05:43:13
问题 This is an updated and shortened question. Communicating with a USB-device should be easy via PyUSB. So, I'm trying to read from a USB-device (oscilloscope) using PyUSB under Win10. Apparently, the USB-driver (libusb-win32 v1.2.6.0) is installed correctly since the device is found and I get some response from print(dev) (see below). From this I can see that the output endpoint address is 0x3 and the input endpoint address is 0x81 According to the Oscilloscope manual, I'm supposed to send