7#ifndef _PICO_ASYNC_CONTEXT_THREADSAFE_BACKGROUND_H
8#define _PICO_ASYNC_CONTEXT_THREADSAFE_BACKGROUND_H
29#ifndef ASYNC_CONTEXT_THREADSAFE_BACKGROUND_MULTI_CORE
30#define ASYNC_CONTEXT_THREADSAFE_BACKGROUND_MULTI_CORE LIB_PICO_MULTICORE
69#if ASYNC_CONTEXT_THREADSAFE_BACKGROUND_MULTI_CORE
71 bool alarm_pool_owned;
int32_t alarm_id_t
The identifier for an alarm.
Definition time.h:379
static bool async_context_threadsafe_background_init_with_defaults(async_context_threadsafe_background_t *self)
Initialize an async_context_threadsafe_background instance with default values.
Definition async_context_threadsafe_background.h:109
bool async_context_threadsafe_background_init(async_context_threadsafe_background_t *self, async_context_threadsafe_background_config_t *config)
Initialize an async_context_threadsafe_background instance using the specified configuration.
Definition async_context_threadsafe_background.c:201
async_context_threadsafe_background_config_t async_context_threadsafe_background_default_config(void)
Return a copy of the default configuration object used by async_context_threadsafe_background_init_wi...
Definition async_context_threadsafe_background.c:28
Configuration object for async_context_threadsafe_background instances.
Definition async_context_threadsafe_background.h:38
alarm_pool_t * custom_alarm_pool
a specific alarm pool to use (or NULL to use ta default)
Definition async_context_threadsafe_background.h:53
uint8_t low_priority_irq_handler_priority
the priority of the low priority IRQ
Definition async_context_threadsafe_background.h:42
Internal state for an async_context_threadsafe_background instance.
Definition async_context_threadsafe_background.h:62
async_context_t core
Base async_context structure; must be first.
Definition async_context_threadsafe_background.h:63
semaphore_t work_needed_sem
Semaphore signalled when work is pending.
Definition async_context_threadsafe_background.h:67
uint8_t low_priority_irq_num
IRQ number of the low-priority IRQ used to process work.
Definition async_context_threadsafe_background.h:73
volatile alarm_id_t alarm_id
ID of the currently active alarm, or 0 if none.
Definition async_context_threadsafe_background.h:68
alarm_pool_t * alarm_pool
Alarm pool used for scheduling; must be on the same core as core_num.
Definition async_context_threadsafe_background.h:64
absolute_time_t last_set_alarm_time
The time at which the alarm was most recently set for.
Definition async_context_threadsafe_background.h:65
volatile bool alarm_pending
True if an alarm is currently pending.
Definition async_context_threadsafe_background.h:74
recursive_mutex_t lock_mutex
Recursive mutex protecting access to the context.
Definition async_context_threadsafe_background.h:66
Base structure type of all async_contexts. For details about its use, see pico_async_context.
Definition async_context.h:179
recursive mutex instance
Definition mutex.h:47
A semaphore for controlling access to a shared resource.
Definition sem.h:37