Menu Toggle
v2.3.1 (RP2350)
Toggle main menu visibility
Loading...
Searching...
No Matches
async_context_poll.h
1
/*
2
* Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef _PICO_ASYNC_CONTEXT_POLL_H
8
#define _PICO_ASYNC_CONTEXT_POLL_H
9
21
#include "
pico/async_context.h
"
22
#include "
pico/sem.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
34
typedef
struct
async_context_poll
{
35
async_context_t
core
;
36
semaphore_t
sem
;
37
}
async_context_poll_t
;
38
49
bool
async_context_poll_init_with_defaults
(
async_context_poll_t
*self);
50
51
#ifdef __cplusplus
52
}
53
#endif
54
55
#endif
async_context.h
async_context_poll_init_with_defaults
bool async_context_poll_init_with_defaults(async_context_poll_t *self)
Initialize an async_context_poll instance with default values.
Definition
async_context_poll.c:16
async_context_poll_t
struct async_context_poll async_context_poll_t
Async context type for a simple single-core polling loop.
semaphore_t
struct semaphore semaphore_t
A semaphore for controlling access to a shared resource.
sem.h
async_context_poll
Async context type for a simple single-core polling loop.
Definition
async_context_poll.h:34
async_context_poll::core
async_context_t core
Core async context state shared by all implementations.
Definition
async_context_poll.h:35
async_context_poll::sem
semaphore_t sem
Semaphore used to signal that work is pending.
Definition
async_context_poll.h:36