We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8509dd commit f0394deCopy full SHA for f0394de
rp2-pio/statemachine.go
@@ -24,7 +24,8 @@ func (sm StateMachine) IsClaimed() bool { return sm.pio.claimedSMMask&(1<<sm.ind
24
func (sm StateMachine) Unclaim() { sm.pio.claimedSMMask &^= (1 << sm.index) }
25
26
// Claim attempts to claim the state machine for use by the caller and returns
27
-// true if successful, or false if StateMachine already claimed.
+// true if successful, or false if StateMachine already claimed. Regardless of result
28
+// the state machine is guaranteed to be claimed after the call ends.
29
func (sm StateMachine) TryClaim() bool {
30
if sm.IsClaimed() {
31
return false
0 commit comments