usb

Getting Volume Name from Device Path in USB devices

Deadly 提交于 2021-02-07 10:47:13
问题 I've built a program using the Windows API that detects the insertion of some media (cd, usb...). The program returns the device path: \\\\?\\usb#vid_vvvv&pid_pppp#aaaaaaaaaaaaaaaa#{gggggggg-gggg-gggg-gggg-gggggggggggg} I am using the function GetVolumeNameForVolumeMountPoint to obtain the volume name by parsing the device interface path as reported here, but it seems that this feature is not working for USB devices. Any idea of how to get the volume name from the device path in case of

Controlling GPIO in CP210x C#

跟風遠走 提交于 2021-02-07 09:39:47
问题 I need to control the GPIO pins of a CP210x device using CP210xManufacturing.dll and CP210xRuntime.dll provided by Silicon Labs. I manage to open and close the device and to get the part number. (In my case a CP2105). I think I successfully read the latch, but I'm not sure. I also call the write latch function, and no error is returned and neither do any pins toggle. According to the provided utility (CP21xxCustomizationUtility.exe) it shows that both ports are in GPIO mode. Here is my code:

Controlling GPIO in CP210x C#

风流意气都作罢 提交于 2021-02-07 09:38:55
问题 I need to control the GPIO pins of a CP210x device using CP210xManufacturing.dll and CP210xRuntime.dll provided by Silicon Labs. I manage to open and close the device and to get the part number. (In my case a CP2105). I think I successfully read the latch, but I'm not sure. I also call the write latch function, and no error is returned and neither do any pins toggle. According to the provided utility (CP21xxCustomizationUtility.exe) it shows that both ports are in GPIO mode. Here is my code:

How will circular DMA periph to memory behave at the end of the transfer in STM32?

江枫思渺然 提交于 2021-02-07 04:14:30
问题 I wanted to ask, how will behave DMA SPI rx in STM32 in following situation. I have a specified (for example) 96 Bytes array called A which is intended to store the data received from the SPI. I turn on my circular SPI DMA which operates on each Byte, is configured to 96 Byte. Is it possible, when DMA will fill my 96 Bytes array, the Transfer Complete interrupt will went off, to quickly copy the 96 Byte array to another - B, before circular DMA will start writing to A(and destroy the data

How will circular DMA periph to memory behave at the end of the transfer in STM32?

ⅰ亾dé卋堺 提交于 2021-02-07 04:08:23
问题 I wanted to ask, how will behave DMA SPI rx in STM32 in following situation. I have a specified (for example) 96 Bytes array called A which is intended to store the data received from the SPI. I turn on my circular SPI DMA which operates on each Byte, is configured to 96 Byte. Is it possible, when DMA will fill my 96 Bytes array, the Transfer Complete interrupt will went off, to quickly copy the 96 Byte array to another - B, before circular DMA will start writing to A(and destroy the data

How do I detect insertion of USB devices category wise in C# winform?

梦想与她 提交于 2021-02-07 04:00:47
问题 USB thumb drives USB harddisks USB DVD writer USB Bluetooth devices USB headsets usb mouse USB keyboard USB webcams / cameras Just want to detect any sort of usb device using event handler... Would appreciate any help... WqlEventQuery q_creation = new WqlEventQuery(); private void Form2_Load(object sender, EventArgs e) { q_creation.EventClassName = "__InstanceCreationEvent"; q_creation.WithinInterval = new TimeSpan(0, 0, 2); //How often do you want to check it? 2Sec. q_creation.Condition = @

How do I detect insertion of USB devices category wise in C# winform?

倾然丶 夕夏残阳落幕 提交于 2021-02-07 03:59:02
问题 USB thumb drives USB harddisks USB DVD writer USB Bluetooth devices USB headsets usb mouse USB keyboard USB webcams / cameras Just want to detect any sort of usb device using event handler... Would appreciate any help... WqlEventQuery q_creation = new WqlEventQuery(); private void Form2_Load(object sender, EventArgs e) { q_creation.EventClassName = "__InstanceCreationEvent"; q_creation.WithinInterval = new TimeSpan(0, 0, 2); //How often do you want to check it? 2Sec. q_creation.Condition = @

USB Host Mode - device access permission granted but not remembered

巧了我就是萌 提交于 2021-02-06 15:14:42
问题 I have a USB Host Mode application that works perfectly. I plug in the device, Android pops up the Allow the app APPNAME to access the USB device? permission request window, I check the Use by default for this USB device tick box and tap OK , then up comes my app and it communicates with the USB device perfectly. BUT... Then I unplug the device and plug it back in. Android pops up the Allow the app APPNAME to access the USB device? dialog again. WTH? I've already told Android to do this by

USB Host Mode - device access permission granted but not remembered

风流意气都作罢 提交于 2021-02-06 15:12:22
问题 I have a USB Host Mode application that works perfectly. I plug in the device, Android pops up the Allow the app APPNAME to access the USB device? permission request window, I check the Use by default for this USB device tick box and tap OK , then up comes my app and it communicates with the USB device perfectly. BUT... Then I unplug the device and plug it back in. Android pops up the Allow the app APPNAME to access the USB device? dialog again. WTH? I've already told Android to do this by

USB Host Mode - device access permission granted but not remembered

℡╲_俬逩灬. 提交于 2021-02-06 15:10:55
问题 I have a USB Host Mode application that works perfectly. I plug in the device, Android pops up the Allow the app APPNAME to access the USB device? permission request window, I check the Use by default for this USB device tick box and tap OK , then up comes my app and it communicates with the USB device perfectly. BUT... Then I unplug the device and plug it back in. Android pops up the Allow the app APPNAME to access the USB device? dialog again. WTH? I've already told Android to do this by