Flash all the buttons!

This commit is contained in:
Neale Pickett 2013-09-08 22:47:27 -06:00
parent 811d225a31
commit 857a549618
1 changed files with 11 additions and 6 deletions

View File

@ -19,16 +19,17 @@
#define DUMP_p(v) DUMPf("%s = %p", #v, v) #define DUMP_p(v) DUMPf("%s = %p", #v, v)
struct device { struct device {
char *name;
uint16_t product_id; uint16_t product_id;
uint8_t ep_in; uint8_t ep_in;
uint8_t ep_out; uint8_t ep_out;
}; };
const struct device devices[] = { const struct device devices[] = {
{0xb102, 0x83, 0x04}, {"Steel", 0xb102, 0x83, 0x04},
{0xb105, 0x82, 0x03}, {"MP3e2", 0xb105, 0x82, 0x03},
{0xb10c, 0x84, 0x02}, {"4Set", 0xb10c, 0x84, 0x02},
{0, 0, 0} {0, 0, 0, 0}
}; };
@ -90,8 +91,12 @@ main(int argc, char **argv)
} }
printf("\n"); printf("\n");
//memset(data, 0xff, sizeof data); {
libusb_bulk_transfer(dev, d->ep_out, data, sizeof data, &transferred, 0); uint8_t data[16];
memset(data, 0xff, sizeof data);
libusb_bulk_transfer(dev, d->ep_out, data, sizeof data, &transferred, 0);
}
} }