-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support gravis/snes controller #72
Comments
Example for Gravis protocol implementation: https://github.com/pulkomandy/stm32f3/blob/master/src/main.c#L80 |
I see you're using interrupts, which I'd like to avoid , so would it be possible to poll on the GPIO ? What is the data rate ? |
also, I hestitate to use as a makefile variable -DGRAVIS , an explicit lib call or a dynamic (but how would we use different hardware ?) |
I think you can look at the previous commit for a polling version. The data rate is about 20 to 25KHz on my controllers. SPI is possible except there is a continuous clock stream and no "chip select" so it won't detect the start and end of frames. You will need to look for the known start pattern (5 consecutive 1 bits) to resynchronize with the bitstream coming from SPI. Once synchronized, the stream has frames of 24bits so you can decode it with a fixed shift. |
(and for the SNES: IIRC, it is up to us to generate the clock. This means we can be SPI master, whereas for Gravis, the controller generates the clock and we are SPI slave). |
Yes the bitbox1 used snes, it's delightfully easy compared to usb Le 15 nov. 2016 14:17, "Adrien Destugues" notifications@github.com a
|
the support of those controllers could be made using a library,
(edit:removed serial related)
The text was updated successfully, but these errors were encountered: