Remove unused functions

This commit is contained in:
shakemid 2017-08-31 11:01:51 +09:00
parent 108a8b6c5d
commit b107c1f0b7

View file

@ -185,33 +185,6 @@ void control_transfer(libusb_device_handle *dev, const char *pquestion) {
} }
} }
void interrupt_transfer(libusb_device_handle *dev) {
int r,s,i;
char answer[reqIntLen];
char question[reqIntLen];
int transferred;
for (i=0;i<reqIntLen; i++) question[i]=i;
s = libusb_interrupt_transfer(dev, endpoint_Int_out, question, reqIntLen, &r, timeout);
if( r < 0 ) {
fprintf(stderr, "USB write failed:%d", s);
perror("USB interrupt write"); bad("USB write failed");
}
s = libusb_interrupt_transfer(dev, endpoint_Int_in, answer, reqIntLen, &r, timeout);
if( r != reqIntLen ) {
fprintf(stderr, "USB read failed:%d", s);
perror("USB interrupt read"); bad("USB read failed");
}
if(debug) {
for (i=0;i<reqIntLen; i++) printf("%i, %i, \n",question[i],answer[i]);
}
libusb_release_interface(dev, 0);
}
void interrupt_read(libusb_device_handle *dev) { void interrupt_read(libusb_device_handle *dev) {
int r,s,i; int r,s,i;
unsigned char answer[reqIntLen]; unsigned char answer[reqIntLen];
@ -257,28 +230,6 @@ void interrupt_read_temperatura(libusb_device_handle *dev, float *tempInC, float
} }
void bulk_transfer(libusb_device_handle *dev) {
int r,s,i;
char answer[reqBulkLen];
s = libusb_bulk_transfer(dev, endpoint_Bulk_out, NULL, 0, &r, timeout);
if( r < 0 ) {
perror("USB bulk write"); bad("USB write failed");
}
s = libusb_bulk_transfer(dev, endpoint_Bulk_in, answer, reqBulkLen, &r, timeout);
if( r != reqBulkLen ) {
perror("USB bulk read"); bad("USB read failed");
}
if(debug) {
for (i=0;i<reqBulkLen; i++) printf("%02x ",answer[i] & 0xFF);
}
libusb_release_interface(dev, 0);
}
void ex_program(int sig) { void ex_program(int sig) {
bsalir=1; bsalir=1;