diff --git a/pcsensor.c b/pcsensor.c index fada631..0aa56d6 100644 --- a/pcsensor.c +++ b/pcsensor.c @@ -213,9 +213,8 @@ void control_transfer(libusb_device_handle *dev, const char *pquestion) { } } -void interrupt_read(libusb_device_handle *dev) { +void interrupt_read(libusb_device_handle *dev, unsigned char *answer) { int r,s,i; - unsigned char answer[reqIntLen]; bzero(answer, reqIntLen); s = libusb_interrupt_transfer(dev, endpoint_Int_in, answer, reqIntLen, &r, timeout); @@ -231,33 +230,6 @@ void interrupt_read(libusb_device_handle *dev) { } } -void interrupt_read_temperature(libusb_device_handle *dev, float *tempInC, float *tempExC) { - int r,s,i, temperature; - unsigned char answer[reqIntLen]; - bzero(answer, reqIntLen); - - s = libusb_interrupt_transfer(dev, endpoint_Int_in, answer, reqIntLen, &r, timeout); - if(r != reqIntLen) { - fprintf(stderr, "USB read failed: %d\n", s); - perror("USB interrupt read"); bad("USB read failed"); - } - - if(debug) { - for (i=0;i