Use spi_is_busy() in blocking SPI writes #3198

Open
volesen wants to merge 1 commit from volesen/volesen/spi-use-is-busy into develop
volesen commented 2026-09-16 12:23:32 -05:00 (Migrated from github.com)

Small drive-by change that replaces the raw BSY register checks in the blocking write functions with spi_is_busy(), matching the use of spi_is_readable() in the neighbouring loops.

I checked with Arm GNU GCC 15.3.1 for RP2040 and RP2350, and Release and default Debug builds are byte-identical before and after.

The only difference is Debug with SPI assertions enabled, where GCC doesn't inline spi_is_busy().

Small drive-by change that replaces the raw BSY register checks in the blocking write functions with `spi_is_busy()`, matching the use of `spi_is_readable()` in the neighbouring loops. I checked with Arm GNU GCC 15.3.1 for RP2040 and RP2350, and Release and default Debug builds are byte-identical before and after. The only difference is Debug with SPI assertions enabled, where GCC doesn't inline `spi_is_busy()`.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'volesen/volesen/spi-use-is-busy:volesen/volesen/spi-use-is-busy'
git switch 'volesen/volesen/spi-use-is-busy'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'develop'
git merge --no-ff 'volesen/volesen/spi-use-is-busy'
git switch 'volesen/volesen/spi-use-is-busy'
git rebase 'develop'
git switch 'develop'
git merge --ff-only 'volesen/volesen/spi-use-is-busy'
git switch 'volesen/volesen/spi-use-is-busy'
git rebase 'develop'
git switch 'develop'
git merge --no-ff 'volesen/volesen/spi-use-is-busy'
git switch 'develop'
git merge --squash 'volesen/volesen/spi-use-is-busy'
git switch 'develop'
git merge --ff-only 'volesen/volesen/spi-use-is-busy'
git switch 'develop'
git merge 'volesen/volesen/spi-use-is-busy'
git push origin 'develop'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!3198
No description provided.