Tarek Lule / VL53L0X_Condensed2
Embed: (wiki syntax)

« Back to documentation index

Init functions

Init functions

Wrapper functions. More...

Functions

int prepare ()
 Prepare device for operation.
int range_start_continuous_mode ()
 Start continuous ranging mode.
int get_distance (uint32_t *p_data)
 Get ranging result and only that.

Detailed Description

Wrapper functions.

API init functions


Function Documentation

int get_distance ( uint32_t *  p_data ) [inherited]

Get ranging result and only that.

Function Description
Unlike VL53L0X_get_ranging_measurement_data() this function only retrieves the range in _mm
It does any required up-scale translation
It can be called after success status polling or in interrupt mode
Warning:
these function is not doing wrap around filtering
This function doesn't perform any data ready check!
Parameters:
p_dataPointer to range distance
Returns:
"0" on success

Definition at line 528 of file VL53L0X.cpp.

int prepare (  ) [inherited]

Prepare device for operation.

Function Description
Does static initialization and reprogram common default settings
Device is prepared for new measure, ready single shot ranging or ALS typical polling operation
After prepare user can :
  • Call other API function to set other settings
  • Configure the interrupt pins, etc...
  • Then start ranging or ALS operations in single shot or continuous mode
Parameters:
void
Returns:
"0" on success

Definition at line 338 of file VL53L0X.cpp.

int range_start_continuous_mode (  ) [inherited]

Start continuous ranging mode.

End user should ensure device is in idle state and not already running

Returns:
"0" on success

Definition at line 635 of file VL53L0X.cpp.