v2.0.0
Functions
async_context_poll
High Level APIs » pico_async_context

async_context_poll provides an implementation of async_context that is intended for use with a simple polling loop on one core. It is not thread safe. More...

## Functions
bool | async_context_poll_init_with_defaults (async_context_poll_t *self)
| Initialize an async_context_poll instance with default values. More...

## Detailed Description

async_context_poll provides an implementation of async_context that is intended for use with a simple polling loop on one core. It is not thread safe.

The async_context_poll() method must be called periodically to handle asynchronous work that may now be pending. async_context_wait_for_work_until() may be used to block a polling loop until there is work to do, and prevent tight spinning.

## Function Documentation

## ◆ 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.

If this method succeeds (returns true), then the async_context is available for use and can be de-initialized by calling async_context_deinit().

Parameters

  self | a pointer to async_context_poll structure to initialize

Returns
  true if initialization is successful, false otherwise