@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
claim.h
Go to the documentation of this file.
/*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _HARDWARE_CLAIM_H
#define _HARDWARE_CLAIM_H
#include "pico.h"
#include "hardware/sync.h"
#ifdef __cplusplus
extern "C" {
#endif
void hw_claim_or_assert(uint8_t *bits, uint bit_index, const char *message);
int hw_claim_unused_from_range(uint8_t *bits, bool required, uint bit_lsb, uint bit_msb, const char *message);
bool hw_is_claimed(const uint8_t *bits, uint bit_index);
void hw_claim_clear(uint8_t *bits, uint bit_index);
uint32_t hw_claim_lock(void);
void hw_claim_unlock(uint32_t token);
#ifdef __cplusplus
}
#endif
#endif
hw_claim_or_assert
void hw_claim_or_assert(uint8_t *bits, uint bit_index, const char *message)
Atomically claim a resource, panicking if it is already in use.
Definition claim.c:21
hw_claim_clear
void hw_claim_clear(uint8_t *bits, uint bit_index)
Atomically unclaim a resource.
Definition claim.c:49
hw_is_claimed
bool hw_is_claimed(const uint8_t *bits, uint bit_index)
Determine if a resource is claimed at the time of the call.
Definition claim.c:17
hw_claim_lock
uint32_t hw_claim_lock(void)
Acquire the runtime mutual exclusion lock provided by the hardware_claim library.
Definition claim.c:9
hw_claim_unused_from_range
int hw_claim_unused_from_range(uint8_t *bits, bool required, uint bit_lsb, uint bit_msb, const char *message)
Atomically claim one resource out of a range of resources, optionally asserting if none are free.
Definition claim.c:31
hw_claim_unlock
void hw_claim_unlock(uint32_t token)
Release the runtime mutual exclusion lock provided by the hardware_claim library.
Definition claim.c:13
pico.h
sync.h