mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
Add param-validation to spin_lock_instance
This commit is contained in:
parent
26fd36f853
commit
a2576202ff
1 changed files with 1 additions and 0 deletions
|
|
@ -194,6 +194,7 @@ inline static void restore_interrupts(uint32_t status) {
|
|||
* \return The spinlock instance
|
||||
*/
|
||||
inline static spin_lock_t *spin_lock_instance(uint lock_num) {
|
||||
invalid_params_if(SYNC, lock_num >= NUM_SPIN_LOCKS);
|
||||
return (spin_lock_t *) (SIO_BASE + SIO_SPINLOCK0_OFFSET + lock_num * 4);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue