-
Notifications
You must be signed in to change notification settings - Fork 69
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
User i2c bus access support #261
Conversation
- Sample was 22050, not 11025. - Sustain not required - already defaults to this value.
* 'master' of https://github.com/tinwhisker/32blit-beta: Add SDL2 include # Conflicts: # 32blit-sdl/CMakeLists.txt
* commit 'dd9823799b093b7986fe2a853e5991dcf177850c': Fix audio-wave example: - Sample was 22050, not 11025. - Sustain not required - already defaults to this value.
* 'master' of https://github.com/tinwhisker/32blit-beta: Add SDL2 include
* 'master' of https://github.com/tinwhisker/32blit-beta: Fix audio-wave example: - Sample was 22050, not 11025. - Sustain not required - already defaults to this value. Add SDL2 include
Thanks! Alas -I've got a set of changes to how the internal i2c devices are handled that will trample all over this - see: 34a4c7f - but the two should be able to co-exist with some modifications. I'm just now sure how User I2C should interact with the battery/tilt state-machine, there are a few options:
Some experimentation might be required due to the... possibility of weirdness. Becuase the system i2c will split up transactions into their transmit and receive phases I'm not totally sure what happens if the user comes along and does a transaction in the midst of that. Bad things, probably. I'm thinking no 2 might be the sensible choice but it would be nice if the user didn't have to care about any of this. At the moment (per your PR) their i2c access will be "blocking" and thus doing something like blasting out a series of LED registers, or reading a device with a large memory (lots of sensor information, or a little camera) could hang up their Maybe this isn't a problem? User i2c will be a "we don't support that, but by all means have fun!" kind of addition to the Blit anyway. On the upside- Right now your code could run with very few modifications- the only thing the user would need to do (I think) is check that the (currently not user-facing) That said, I'm still mindful of no 4- I don't know how Whew... that's a long post! |
Ah having read the code, it looks like |
Closing for now, since it's hopelessly conflicted and stale but there might be good cause to append this to the API when things have settled somewhat. I think it could work. |
A user can now spam the i2c bus.