Closed Dominaezzz closed 10 months ago
Isn't the result saved in op_res
, which is bubbled up later, after the deassertion? The comment hints that this is exactly the intention.
So CS will be deasserted also in case of an error.
Apologies, I can't read :sweat_smile:, I missed the fact that that bit is in a closure, so the ?
does the right thing.
https://github.com/rust-embedded/embedded-hal/blob/84dfc74b59279eb433fde0c2b928570c4da59136/embedded-hal-bus/src/spi/shared.rs#L29
If that flush fails, shouldn't the error fall through to the de-assertion at the end of the function instead of returning immediately?