Skip to content
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

how to share the SPI bus between this crate and another? #20

Open
mutantbob opened this issue Jun 16, 2022 · 2 comments
Open

how to share the SPI bus between this crate and another? #20

mutantbob opened this issue Jun 16, 2022 · 2 comments

Comments

@mutantbob
Copy link

If I want to transfer data between an OV5642 camera (SPI) and an ST7789 display, how do I share the SPI bus?

The display_interface_spi::SPIInterface takes ownership of the SPI object, preventing me from sharing it with the OV5642, and I can not buffer the entire image (320x240 even converted to 16 bits would exceed the RAM on the Arduino Uno).

@almindor
Copy link
Owner

This is a problem in the HAL of your PAC. I've tried to solve this for the RISC-V MCUs of E310x family by introducing a shared device concept based on this design with this similar implementation in the HAL

So sadly if you need shared bus, the HAL implementor for your SoC will need to add that.

@almindor
Copy link
Owner

As for a workaround you can use release() to get the SPI back and sort of just juggle the around. Display interface has a release() as well which will give you the whole thing back. It's a crappy workaround tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants