Module rp2040_pac::sio::spinlock

source ·
Expand description

Reading from a spinlock address will:

  • Return 0 if lock is already locked
  • Otherwise return nonzero, and simultaneously claim the lock

Writing (any value) releases the lock.
If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.
The value returned on success is 0x1 << lock number.

Structs§

Type Aliases§

  • Register SPINLOCK%s reader
  • Register SPINLOCK%s writer