“ubuntu教程”ubuntu下通过dnw2下载烧写mini2440

来源: 电脑维修教程   阅读:     发表时间:

dnw2 dnw2 安装申明: dnw2.c 文件 /* dnw2 linux main file. this depends on libusb. * * author: fox * license: gpl * */ #include #include #include #include #include #include #define qq2440_secbul

dnw2

dnw2 安装申明:

dnw2.c 文件

/* dnw2 linux main file. this depends on libusb.

*

* author: fox

* license: gpl

*

*/

#include

#include

#include

#include

#include

#include

#define qq2440_secbulk_idvendor 0x5345

#define qq2440_secbulk_idproduct 0x1234

struct usb_dev_handle * open_port() {

struct usb_bus *busses, *bus;

usb_init();

usb_find_busses();

usb_find_devices();

busses = usb_get_busses();

for (bus = busses; bus; bus = bus->next) {

struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next) {

printf("idvendor:0x%xt,ipproduct:0x%xn",

dev->descriptor.idvendor, dev->descriptor.idproduct);

if (qq2440_secbulk_idvendor == dev->descriptor.idvendor

&& qq2440_secbulk_idproduct == dev->descriptor.idproduct) {

printf("target usb device found!n");

struct usb_dev_handle *hdev = usb_open(dev);

if (!hdev) {

perror("cannot open device");

} else {

if (0 != usb_claim_interface(hdev, 0)) {

以上是:解决“ubuntu教程”ubuntu下通过dnw2下载烧写mini2440问题的详细资料教程

?
热门链接: 机顶盒 | 主板维修 | 声卡怎么安装 | 路由器怎么设置 | 电脑内存维修技术 | 维修大全?| 主板维修资料 | 电脑声卡音响故障维修 | 内存 | 显示器 | 电源维修教程 | cpu | 硬盘 | 显卡 |win8操作系统教程|linux操作系统教程|ubuntu操作系统教程|mac苹果操作系统教程|execl教程
友情链接: ?苹果手机维修?| 更多...