| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -323,6 +323,9 @@ JNIEXPORT jint JNICALL Java_processing_io_NativeInterface_transferI2c | |||
| 323 | 323 | packets.nmsgs++; | |
| 324 | 324 | } | |
| 325 | 325 | ||
| 326 | + // set the timeout to 100ms - this helps slow devices such as the | ||
| 327 | + // Arduino Uno to keep up | ||
| 328 | + ioctl(handle, I2C_TIMEOUT, 10); | ||
| 326 | 329 | int ret = ioctl(handle, I2C_RDWR, &packets); | |
| 327 | 330 | if (ret < 0) { | |
| 328 | 331 | ret = -errno; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments