-
Notifications
You must be signed in to change notification settings - Fork 174
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
Sharing a SpiDriver between multiple Devices with different configs #476
Comments
not using a SpiBusDriver but directly creating multiple SpiDevice instance's with different configs for each? You can have a look at the loopback example where we create two SpiDeviceDrivers with two different clock speeds. |
the Problem here is that my display needs to have a minor delay between 2 bytes what I do in the device via manually pulling the CS to high and the later again to low. I think I found a way by passing Option::::None as cs it is possible to create without setting a pin thanks. |
is this thread safe this way and can use this in different task each for a spi device? |
you can have SpiDeviceDriver A in thread A and SpiDeviceDriver B in thread B yes. Though if you want to share SpiDeviceDriver A in thread A and B you have to lock that yourself. |
Thanks |
Im currently trying to get multiple SpiDeviceDrivers out of SpiDriver cause the devices have different configs. Borrowing worked for compiling but all the time I try to create the second DeviceDriver the esp get stuck in execution.
Is there first an easy way to share to share a SpiBus here with out these issues and is there additional documentation for such cases?
I tryed
The text was updated successfully, but these errors were encountered: