-
Notifications
You must be signed in to change notification settings - Fork 264
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
Expose the KEEP_CS_ACTIVE option (This is important for chunked transfers in a single transaction) #2797
Comments
KEEP_CS_ACTIVE
option (This is important for chunked transfers in a single transaction)
KEEP_CS_ACTIVE
option (This is important for chunked transfers in a single transaction)
For the same reasons as #2795, this can be implemented later. |
Unlike #2795 I don't think this can come later. This is not the sort of setting one puts in a config, it's the sort of thing you'd specify per-transfer. If there was some kind of TransferConfig struct that this could go into, then yes, it could be postponed, but right now it can't. I think this needs a more concrete plan |
There will be something like this, probably Regardless, this is strictly to do with segmented transfers, right? Which are only possible with DMA, which we're not stabilizing yet. |
No, this applies to CPU transfers as well. It's used quite a bit in esp-idf-hal.
DeviceConfig sounds like something you would set once per device driver created, this option however is something that would still be specified per transfer, which I think should be a separate config. |
We might go in the same direction as with I2C transfers, and provide a low-level transaction api to build stuff like this. Regardless, it's not needed right now for what we intend to stabilize. |
That would be a little too restrictive 😅 I suppose it doesn't have to be stabilised now, my concern is I don't think you can add this afterwards, in a nice way. |
How do you know it would be restrictive? We haven't even started to design it. Anyhow, PRs are welcome in case you'd like the functionality before we get to it. |
Because I've dealt with it in esp-idf-hal where they pretty much did what you've described.
I'd make a PR but y'all still need to decide what to stabilise. |
but this would all still be internal right? and we can expose it via the low level transaction builder API in the future.
Doesn't even have to be a PR, just some more concrete use cases and scenarios might help me understand a bit more about what needs to be done here. I've seen the impl in esp-idf-hal, I don't think it's that bad, in each transaction loop it checks if there is more data to send and if there is it sets the keep cs active flag. |
This would have to be external really, like esp-idf does it. A "transaction builder" API makes sense for something like I2C where the hardware interface makes you prepare a list of commands in some registers. If we're still trying to expose an inherent API, this flag has to be exposed in the lower level (no chunking) APIs.
That works, I'll come up with scenarios. |
Use cases for a public "keep cs active" option.
I think these two issues actually describe the two use cases I'm thinking of pretty well. The first being you may not know when the transaction is going to end. Neither of which can be achieved with a transaction builder API but the hardware itself can certainly do it. |
No description provided.
The text was updated successfully, but these errors were encountered: