nrfcxx  0.1.0
C++-17 Framework for Nordic nRF5 Devices
Public Member Functions | Friends
nrfcxx::sensor::ccs811::scoped_enabler Class Reference

Class obtained from scoped_enable(). More...

#include <nrfcxx/sensor/ccs811.hpp>

Public Member Functions

 operator bool () const
 Boolean value of the enabler is true iff the interface is enabled.
 
int result () const
 Return the result of invoking periph::TWI::enable() in the constructor. More...
 
void assert ()
 Assert WAKEn and delay until I2C operations are allowed.
 
void deassert ()
 De-assert WAKEn and delay as required.
 

Friends

class ccs811
 

Detailed Description

Class obtained from scoped_enable().

Member Function Documentation

◆ result()

int nrfcxx::sensor::ccs811::scoped_enabler::result ( ) const
inline

Return the result of invoking periph::TWI::enable() in the constructor.

If this is negative the attempt to enable TWI failed, and most likely subsequent operations will fail or hang.


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