Skip to content

Instantly share code, notes, and snippets.

@hutorny
hutorny / ch340.c
Created January 24, 2016 14:36 — forked from z4yx/ch340.c
//libusb+ch340 data transfer demo
//gcc usb.c `pkg-config libusb-1.0 --libs --cflags` -o usb
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/select.h>