Skip to content

spi(all): ensure halt is idempotent#1173

Merged
gen2thomas merged 1 commit intohybridgroup:devfrom
gen2thomas:fix/spi_halt
Oct 4, 2025
Merged

spi(all): ensure halt is idempotent#1173
gen2thomas merged 1 commit intohybridgroup:devfrom
gen2thomas:fix/spi_halt

Conversation

@gen2thomas
Copy link
Copy Markdown
Collaborator

@gen2thomas gen2thomas commented Oct 4, 2025

Solved issues and/or description of the change

see #1170

The fix is done in a generic way by adding unexposed wrapper functions in "spi_driver.go". Those functions check for connection is nil before calling the "connection.Func()". Additionally on "driver.Halt()" the connection is set to nil explicitly, so potential users of "d.beforeHalt" (normally functions are named "shutdown") can decide on this variable what to do.

Manual test

none

Checklist

  • The PR's target branch is 'hybridgroup:dev'
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (e.g. by run make test_race)
  • No linter errors exist locally (e.g. by run make fmt_check)
  • I have performed a self-review of my own code

@gen2thomas gen2thomas marked this pull request as ready for review October 4, 2025 08:49
@gen2thomas gen2thomas merged commit 7bfec7c into hybridgroup:dev Oct 4, 2025
2 checks passed
@gen2thomas gen2thomas deleted the fix/spi_halt branch October 4, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant