Added missing usb_strerror function.

This commit is contained in:
Klaus Reimer 2011-01-30 14:56:27 +01:00 committed by k
parent 7311f38ef5
commit b07502a5a4
2 changed files with 22 additions and 0 deletions

View File

@ -344,3 +344,16 @@ JNIEXPORT jint JNICALL METHOD_NAME(USB, usb_1interrupt_1read)
return usb_interrupt_read(unwrap_usb_dev_handle(env, handle),
ep, buf, buflen, timeout);
}
/**
* string usb_strerror()
*/
JNIEXPORT jstring JNICALL METHOD_NAME(USB, usb_1strerror)
(
JNIEnv *env, jclass class
)
{
return (*env)->NewStringUTF(env, usb_strerror());
}

View File

@ -755,4 +755,13 @@ public final class USB
public static native int usb_interrupt_read(final USB_Dev_Handle handle,
final int ep, final ByteBuffer bytes, final int timeout);
/**
* Returns the last error message.
*
* @return The last error message.
*/
public static native String usb_strerror();
}