FastLED 3.9.15
Loading...
Searching...
No Matches
fl::spi::Transaction Class Reference

Detailed Description

Handle for asynchronous SPI operations.

RAII wrapper that automatically waits on destruction if not completed

Note
Move-only type (non-copyable)

Definition at line 38 of file transaction.h.

#include <transaction.h>

+ Collaboration diagram for fl::spi::Transaction:

Classes

struct  Impl
 Private implementation data for Transaction class. More...
 

Public Member Functions

 Transaction (Transaction &&other) FL_NOEXCEPT
 
 ~Transaction ()
 Destructor - automatically waits for completion.
 
bool cancel ()
 Cancel pending transaction (if supported by platform)
 
fl::optional< fl::task::ErrorgetResult () const
 Get result of completed transaction.
 
bool isDone () const
 Check if transaction is complete.
 
bool isPending () const
 Check if transaction is still in progress.
 
Transactionoperator= (Transaction &&other) FL_NOEXCEPT
 
bool wait (u32 timeout_ms=(fl::numeric_limits< u32 >::max)())
 Wait for transaction to complete.
 

Private Member Functions

 Transaction () FL_NOEXCEPT
 
 Transaction (const Transaction &) FL_NOEXCEPT=delete
 
Transactionoperator= (const Transaction &) FL_NOEXCEPT=delete
 

Private Attributes

fl::unique_ptr< ImplpImpl
 

Friends

class Device
 

The documentation for this class was generated from the following files: