Buffer Read Issue with Vendor Class #407
Unanswered
SpencerRiffle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My university team and I are working with TinyUSB to implement communication between a custom etch-a-sketch type device and our host machine. We set the device up as a Vendor-type USB class because we wanted to be able to write our own driver for it.
Our goal is simply to be able to read data from it when we want, but we're having trouble reading when first connecting to the device. The order of events is:
a. import fcntl, os
b. f = os.open("/dev/deviceName", os.O_RDWR)
a. print(os.read(f, 64))
Unfortunately, as long as we don't turn the knobs before reading data from the buffer, we get this error:
We've tried writing data with dev.write() in setup, and we've checked to make sure that data is actually sending. What could we be missing? I've attached some reference code below. Any advice would be greatly appreciated!
Here's some of the header file code
And here is some of the main file's code:
Beta Was this translation helpful? Give feedback.
All reactions