Loading...
Searching...
No Matches
boot_lock.h File Reference
#include "pico.h"
#include "hardware/sync.h"
#include "hardware/structs/bootram.h"

Go to the source code of this file.

Macros

#define PARAM_ASSERTIONS_ENABLED_HARDWARE_BOOT_LOCK   0

Typedefs

typedef volatile uint32_t boot_lock_t
 A boot lock identifier.

Functions

static __force_inline boot_lock_t * boot_lock_instance (uint lock_num)
 Get HW Bootlock instance from number.
static __force_inline uint boot_lock_get_num (boot_lock_t *lock)
 Get HW Bootlock number from instance.
static __force_inline void boot_lock_unsafe_blocking (boot_lock_t *lock)
 Acquire a boot lock without disabling interrupts (hence unsafe).
static __force_inline bool boot_try_lock_unsafe (boot_lock_t *lock)
 try to acquire a boot lock without disabling interrupts (hence unsafe)
static __force_inline void boot_unlock_unsafe (boot_lock_t *lock)
 Release a boot lock without re-enabling interrupts.
static __force_inline uint32_t boot_lock_blocking (boot_lock_t *lock)
 Acquire a boot lock safely.
static bool is_boot_locked (boot_lock_t *lock)
 Check to see if a bootlock is currently acquired elsewhere.
static __force_inline void boot_unlock (boot_lock_t *lock, uint32_t saved_irq)
 Release a boot lock safely.
boot_lock_t * boot_lock_init (uint lock_num)
 Initialise a boot lock.
void boot_locks_reset (void)
 Release all boot locks.