mirror of
https://github.com/shakemid/pcsensor-temper.git
synced 2025-01-21 09:08:17 +01:00
Remove unused functions
This commit is contained in:
parent
108a8b6c5d
commit
b107c1f0b7
1 changed files with 0 additions and 49 deletions
49
pcsensor.c
49
pcsensor.c
|
@ -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) {
|
||||
int r,s,i;
|
||||
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) {
|
||||
bsalir=1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue