-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2566: Make SPI return buffers upon error r=hudson-ayers a=alexandruradovici ### Pull Request Overview This pull request changes the SPI HIL so that function return the buffers to the caller in case of errors. It also adds deferred callbacks to the SPI Mux, similar to what the I2C Mux. I have two questions that need some feedback: 1. Several drivers now output a warning due to unverified result. The two simple solutions are: use `let _ =` or use `.unwrap()`. I'm not sure which one would be best. 2. The setup functions, like `configure` or `set_rate` do have to return results, as the Mux might fail to execute them. There is no callback function defined for this. Should I add a new callback function, something like `command_done` or simply remove the return from the functions? ### Testing Strategy The PR still needs testing and review. ### TODO or Help Wanted Testing on different boards would be very helpful. I can test on STM32F4 and Adafruit CLUE. ### Documentation Updated - [ ] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [ ] Ran `make prepush`. Co-authored-by: Alexandru Radovici <msg4alex@gmail.com> Co-authored-by: Philip Levis <pal@cs.stanford.edu>
- Loading branch information
Showing
30 changed files
with
894 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.