FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
devices::vl53l0x::GPIOSettings Class Reference

Settings for behavior of VL53L0X GPIO pin. More...

#include <fastarduino/devices/vl53l0x_types.h>

Public Member Functions

GPIOFunction function () const
 Return the current GPIO interrupt trigger source. More...
 
bool high_polarity () const
 Return the current polarity level of GPIO interrupts. More...
 
uint16_t low_threshold () const
 Return the current low threshold, in mm. More...
 
uint16_t high_threshold () const
 Return the current high threshold, in mm. More...
 

Static Public Member Functions

static constexpr GPIOSettings sample_ready (bool high_polarity=false)
 Create GPIOSettings for interrupt triggered when range sample is ready. More...
 
static constexpr GPIOSettings low_threshold (uint16_t threshold, bool high_polarity=false)
 Create GPIOSettings for interrupt triggered when range is under threshold. More...
 
static constexpr GPIOSettings high_threshold (uint16_t threshold, bool high_polarity=false)
 Create GPIOSettings for interrupt triggered when range is above threshold. More...
 
static constexpr GPIOSettings out_of_window (uint16_t low_threshold, uint16_t high_threshold, bool high_polarity=false)
 Create GPIOSettings for interrupt triggered when range is outside a window between low_threshold and high_threshold. More...
 

Detailed Description

Settings for behavior of VL53L0X GPIO pin.

See also
GPIOFunction
VL53L0X::get_GPIO_settings()
VL53L0X::set_GPIO_settings()

Definition at line 371 of file vl53l0x_types.h.

Member Function Documentation

◆ sample_ready()

static constexpr GPIOSettings devices::vl53l0x::GPIOSettings::sample_ready ( bool  high_polarity = false)
inlinestaticconstexpr

Create GPIOSettings for interrupt triggered when range sample is ready.

Parameters
high_polarityforce GPIO interrupt polarity to HIGH; this is not advised as most breakouts include a pullup resistor.

Definition at line 387 of file vl53l0x_types.h.

◆ low_threshold() [1/2]

static constexpr GPIOSettings devices::vl53l0x::GPIOSettings::low_threshold ( uint16_t  threshold,
bool  high_polarity = false 
)
inlinestaticconstexpr

Create GPIOSettings for interrupt triggered when range is under threshold.

Parameters
thresholdthe low threshold (in mm) under which an interrupt shall be triggered
high_polarityforce GPIO interrupt polarity to HIGH; this is not advised as most breakouts include a pullup resistor.

Definition at line 400 of file vl53l0x_types.h.

◆ high_threshold() [1/2]

static constexpr GPIOSettings devices::vl53l0x::GPIOSettings::high_threshold ( uint16_t  threshold,
bool  high_polarity = false 
)
inlinestaticconstexpr

Create GPIOSettings for interrupt triggered when range is above threshold.

Parameters
thresholdthe high threshold (in mm) above which an interrupt shall be triggered
high_polarityforce GPIO interrupt polarity to HIGH; this is not advised as most breakouts include a pullup resistor.

Definition at line 413 of file vl53l0x_types.h.

◆ out_of_window()

static constexpr GPIOSettings devices::vl53l0x::GPIOSettings::out_of_window ( uint16_t  low_threshold,
uint16_t  high_threshold,
bool  high_polarity = false 
)
inlinestaticconstexpr

Create GPIOSettings for interrupt triggered when range is outside a window between low_threshold and high_threshold.

Parameters
low_thresholdthe low threshold (in mm) under which an interrupt shall be triggered
high_thresholdthe high threshold (in mm) above which an interrupt shall be triggered
high_polarityforce GPIO interrupt polarity to HIGH; this is not advised as most breakouts include a pullup resistor.

Definition at line 428 of file vl53l0x_types.h.

◆ function()

GPIOFunction devices::vl53l0x::GPIOSettings::function ( ) const
inline

Return the current GPIO interrupt trigger source.

Definition at line 437 of file vl53l0x_types.h.

◆ high_polarity()

bool devices::vl53l0x::GPIOSettings::high_polarity ( ) const
inline

Return the current polarity level of GPIO interrupts.

Definition at line 444 of file vl53l0x_types.h.

◆ low_threshold() [2/2]

uint16_t devices::vl53l0x::GPIOSettings::low_threshold ( ) const
inline

Return the current low threshold, in mm.

Definition at line 451 of file vl53l0x_types.h.

◆ high_threshold() [2/2]

uint16_t devices::vl53l0x::GPIOSettings::high_threshold ( ) const
inline

Return the current high threshold, in mm.

Definition at line 458 of file vl53l0x_types.h.


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