18#ifndef MBED_ASYNC_OP_H
19#define MBED_ASYNC_OP_H
21#include "rtos/Mutex.h"
22#include "rtos/Semaphore.h"
26#include "OperationListBase.h"
Base class for asynchronous operations in the USB stack.
virtual bool process()=0
Callback indicating that something changed.
AsyncOp(mbed::Callback< void()> &callback)
Construct a new AsyncOp object.
AsyncOp()
Construct a new AsyncOp object.
void wait(rtos::Mutex *host_mutex, rtos::Kernel::Clock::duration_u32 rel_time=rtos::Kernel::wait_for_u32_forever)
Wait for this asynchronous operation to complete.
bool aborted()
Check if this operation was aborted.
bool timeout()
Check if this operation timed out.
void abort()
Abort this asynchronous operation.
virtual void complete()
Callback indicating that this event finished.
virtual ~AsyncOp()
Cleanup resources used by this AsyncOp.
Callback class based on template specialization.
The Mutex class is used to synchronize the execution of threads.
The Semaphore class is used to manage and protect access to a set of shared resources.
constexpr Clock::duration_u32 wait_for_u32_forever
Magic "wait forever" constant for Kernel::Clock::duration_u32-based APIs.