-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
detect if SPI bus has been initialized (IDFGH-7142) #8745
Comments
I think that's a trivial change, and there may even be an argument for creating an esp_err_t define specifically for denoting that something's already been initialized. |
I'd also appreciate such functionality - for the reason above, each peripheral driver does SPI initialization independent from the others. |
Bump 👀 |
+1 |
As a workaround I've settled on this method....
It seems to work consistently, but would still be very helpful to have a method that we know will continue to work in the future. |
I'm using idf v 4.4.2 and I don't find any |
Also using ~4.4.2, you'll need to include |
Thanks a lot @morganrallen but I still have the issue reported here |
Is this resolved? Is there a way to check if SPI is initialized or not? |
This is a followup on #8642
If a method was provided to detect if the bus was already initialized a decision could be made on calling
spi_bus_free
before reinitializing. In my situation I have a driver that supports multiple devices that all might not be initialized at the same time. I need a way to see if the bus need initializing (for the first device) or not (for the rest of them).Describe the solution you'd like
Some function call like
bool spi_bus_initialized(spi_host_device_t host_id, spi_bus_config_t *bus_config)
orspi_bus_is_initialized
for better clarity.The text was updated successfully, but these errors were encountered: