Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
This actually now works with the fx-9860GII
Browse files Browse the repository at this point in the history
Thanks to hhacker for pointers on getting this to work.
  • Loading branch information
lol768 committed Jun 18, 2015
1 parent d1909ec commit 5b3d3ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xfer9860/trunk/src/usbio.c
Expand Up @@ -22,7 +22,7 @@

#include "usbio.h"
#include "config.h"

#include "Casio9860.h"
#include <stdio.h>
#include <libusb-1.0/libusb.h>

Expand Down Expand Up @@ -76,6 +76,11 @@ int ReadUSB(struct libusb_device_handle *usb_handle, char *buffer, int length) {
int BytesRead = 0;

ret = libusb_bulk_transfer(usb_handle, 0x82, buffer, length, &BytesRead, USB_READ_TIMEOUT);
if (fx_getPacketType(buffer) != T_POSITIVE) {
ret = libusb_bulk_transfer(usb_handle,0x82,buffer,length, &BytesRead,USB_READ_TIMEOUT);
}


if (ret < 0) { printf("ERR: ReadUSB(): Could not read: %i\n", ret); }
debug(1, buffer, BytesRead);
return BytesRead;
Expand Down

0 comments on commit 5b3d3ab

Please sign in to comment.