Skip to content

Commit f0394de

Browse files
committed
document TryClaim some more
1 parent e8509dd commit f0394de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rp2-pio/statemachine.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ func (sm StateMachine) IsClaimed() bool { return sm.pio.claimedSMMask&(1<<sm.ind
2424
func (sm StateMachine) Unclaim() { sm.pio.claimedSMMask &^= (1 << sm.index) }
2525

2626
// Claim attempts to claim the state machine for use by the caller and returns
27-
// true if successful, or false if StateMachine already claimed.
27+
// 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.
2829
func (sm StateMachine) TryClaim() bool {
2930
if sm.IsClaimed() {
3031
return false

0 commit comments

Comments
 (0)