Code petit robot

Dependencies:   X_NUCLEO_COMMON X_NUCLEO_IHM01A1 mbed

Embed: (wiki syntax)

« Back to documentation index

Init functions

Init functions

API init functions. More...

Functions

int WaitDeviceBooted ()
 Wait for device booted after chip enable (hardware standby)
virtual int Init ()
 One time device initialization.
int SetupGPIO1 (uint8_t InitFunction, int ActiveHigh)
 Configure GPIO1 function and set polarity.
int Prepare ()
 Prepare device for operation.
int RangeStartContinuousMode ()
 Start continuous ranging mode.
int RangeStartSingleShot ()
 Start single shot ranging measure.
int RangeSetMaxConvergenceTime (uint8_t MaxConTime_msec)
 Set maximum convergence time.
int RangePollMeasurement (VL6180x_RangeData_t *pRangeData)
 Single shot Range measurement in polling mode.
int RangeGetMeasurementIfReady (VL6180x_RangeData_t *pRangeData)
 Check for measure readiness and get it if ready.
int RangeGetMeasurement (VL6180x_RangeData_t *pRangeData)
 Retrieve range measurements set from device.
virtual int GetRange (int32_t *piData)
 Get ranging result and only that.
int RangeConfigInterrupt (uint8_t ConfigGpioInt)
 Configure ranging interrupt reported to application.
int RangeGetInterruptStatus (uint8_t *pIntStatus)
 Return ranging error interrupt status.
int AlsPollMeasurement (VL6180x_AlsData_t *pAlsData)
 Run a single ALS measurement in single shot polling mode.
int AlsGetMeasurement (VL6180x_AlsData_t *pAlsData)
 Get actual ALS measurement.
int AlsConfigInterrupt (uint8_t ConfigGpioInt)
 Configure ALS interrupts provide to application.
int AlsSetIntegrationPeriod (uint16_t period_ms)
 Set ALS integration period.
int AlsSetInterMeasurementPeriod (uint16_t intermeasurement_period_ms)
 Set ALS "inter-measurement period".
int AlsSetAnalogueGain (uint8_t gain)
 Set ALS analog gain code.
int AlsSetThresholds (uint16_t lux_threshold_low, uint16_t lux_threshold_high)
 Set thresholds for ALS continuous mode.
int AlsGetInterruptStatus (uint8_t *pIntStatus)
 Read ALS interrupt status.
int StaticInit ()
 Low level ranging and ALS register static settings (you should call VL6180x_Prepare() function instead)
int RangeWaitDeviceReady (int MaxLoop)
 Wait for device to be ready (before a new ranging command can be issued by application)
int RangeSetInterMeasPeriod (uint32_t InterMeasTime_msec)
 Program Inter measurement period (used only in continuous mode)
int UpscaleSetScaling (uint8_t scaling)
 Set device ranging scaling factor.
int UpscaleGetScaling ()
 Get current ranging scaling factor.
uint16_t GetUpperLimit ()
 Get the maximal distance for actual scaling.
int RangeSetThresholds (uint16_t low, uint16_t high, int SafeHold)
 Apply low and high ranging thresholds that are considered only in continuous mode.
int RangeGetThresholds (uint16_t *low, uint16_t *high)
 Get scaled high and low threshold from device.
int RangeSetRawThresholds (uint8_t low, uint8_t high)
 Set ranging raw thresholds (scaling not considered so not recommended to use it)
int RangeSetEceFactor (uint16_t FactorM, uint16_t FactorD)
 Set Early Convergence Estimate ratio.
int RangeSetEceState (int enable)
 Set Early Convergence Estimate state (See SYSRANGE_RANGE_CHECK_ENABLES register)
int FilterSetState (int state)
 Set activation state of the wrap around filter.
int FilterGetState ()
 Get activation state of the wrap around filter.
int DMaxSetState (int state)
 Set activation state of DMax computation.
int DMaxGetState ()
 Get activation state of DMax computation.
int RangeSetSystemMode (uint8_t mode)
 Set ranging mode and start/stop measure (use high level functions instead : VL6180x_RangeStartSingleShot() or VL6180x_RangeStartContinuousMode())
int InitSensor (uint8_t NewAddr)
 Initialize the sensor with default values.
int StartMeasurement (OperatingMode operating_mode, void(*fptr)(void), uint16_t low, uint16_t high)
 Start the measure indicated by operating mode.
int HandleIRQ (OperatingMode operating_mode, MeasureData_t *Data)
 Interrupt handling func to be called by user after an INT is occourred.
int GetMeasurement (OperatingMode operating_mode, MeasureData_t *Data)
 Get results for the measure indicated by operating mode.
int StopMeasurement (OperatingMode operating_mode)
 Stop the currently running measure indicate by operating_mode.

Variables

struct VL6180xDevData_t SingleVL6180xDevData
 the unique driver data When single device driver is active
static const uint16_t
ScalerLookUP[] 
ROMABLE_DATA = { 253, 127, 84}
 ScalerLookUP scaling factor-1 to register RANGE_SCALER lookup.

Detailed Description

API init functions.

Wrapper functions.

API init functions


Function Documentation

int AlsConfigInterrupt ( uint8_t  ConfigGpioInt ) [inherited]

Configure ALS interrupts provide to application.

Parameters:
ConfigGpioIntSelect one (and only one) of :
CONFIG_GPIO_INTERRUPT_DISABLED
CONFIG_GPIO_INTERRUPT_LEVEL_LOW
CONFIG_GPIO_INTERRUPT_LEVEL_HIGH
CONFIG_GPIO_INTERRUPT_OUT_OF_WINDOW
CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY
Returns:
0 on success may return INVALID_PARAMS for invalid mode

Definition at line 497 of file vl6180x_class.h.

int AlsGetInterruptStatus ( uint8_t *  pIntStatus ) [inherited]

Read ALS interrupt status.

Parameters:
pIntStatusPointer to status
Returns:
0 on success

Definition at line 558 of file vl6180x_class.h.

int AlsGetMeasurement ( VL6180x_AlsData_t pAlsData ) [inherited]

Get actual ALS measurement.

Function Description
Can be called after success status polling or in interrupt mode to retrieve ALS measurement from device
This function doesn't perform any data ready check !
Parameters:
pAlsDataPointer to measurement struct VL6180x_AlsData_t
Returns:
0 on success

Definition at line 481 of file vl6180x_class.h.

int AlsPollMeasurement ( VL6180x_AlsData_t pAlsData ) [inherited]

Run a single ALS measurement in single shot polling mode.

Function Description
Kick off a new single shot ALS then wait new measurement ready to retrieve it ( polling system interrupt status register for als)
ALS must be prepared by a first call to VL6180x_Prepare()

Should not be used in continuous or interrupt mode it will break it and create hazard in start/stop
Parameters:
devThe device
pAlsDataAls data structure to fill up VL6180x_AlsData_t
Returns:
0 on success

Definition at line 466 of file vl6180x_class.h.

int AlsSetAnalogueGain ( uint8_t  gain ) [inherited]

Set ALS analog gain code.

Function Description
ALS gain code value programmed in SYSALS_ANALOGUE_GAIN .
Parameters:
gainGain code see datasheet or AlsGainLookUp for real value. Value is clipped to 7.
Returns:
0 on success

Definition at line 536 of file vl6180x_class.h.

int AlsSetIntegrationPeriod ( uint16_t  period_ms ) [inherited]

Set ALS integration period.

Parameters:
period_msIntegration period in msec. Value in between 50 to 100 msec is recommended
Returns:
0 on success

Definition at line 508 of file vl6180x_class.h.

int AlsSetInterMeasurementPeriod ( uint16_t  intermeasurement_period_ms ) [inherited]

Set ALS "inter-measurement period".

Function Description
The so call data-sheet "inter measurement period" is actually an extra inter-measurement delay
Parameters:
intermeasurement_period_msInter measurement time in milli second
Warning:
applied value is clipped to 2550 ms
Returns:
0 on success if value is

Definition at line 523 of file vl6180x_class.h.

int AlsSetThresholds ( uint16_t  lux_threshold_low,
uint16_t  lux_threshold_high 
) [inherited]

Set thresholds for ALS continuous mode.

Warning:
Threshold are raw device value not lux!
Function Description
Basically value programmed in SYSALS_THRESH_LOW and SYSALS_THRESH_HIGH registers
Parameters:
lowALS low raw threshold for SYSALS_THRESH_LOW
highALS high raw threshold for SYSALS_THRESH_HIGH
Returns:
0 on success

Definition at line 2661 of file vl6180x_class.cpp.

int DMaxGetState (  ) [inherited]

Get activation state of DMax computation.

Returns:
Filter enabled or not, when filter is not supported it always returns 0S

Definition at line 758 of file vl6180x_class.h.

int DMaxSetState ( int  state ) [inherited]

Set activation state of DMax computation.

Parameters:
stateNew activation state (0=off, otherwise on)
Returns:
0 on success

Definition at line 749 of file vl6180x_class.h.

int FilterGetState (  ) [inherited]

Get activation state of the wrap around filter.

Returns:
Filter enabled or not, when filter is not supported it always returns 0S

Definition at line 739 of file vl6180x_class.h.

int FilterSetState ( int  state ) [inherited]

Set activation state of the wrap around filter.

Parameters:
stateNew activation state (0=off, otherwise on)
Returns:
0 on success

Definition at line 730 of file vl6180x_class.h.

int GetMeasurement ( OperatingMode  operating_mode,
MeasureData_t *  Data 
) [inherited]

Get results for the measure indicated by operating mode.

Parameters:
[in]operating_modespecifies requested measure results
[out]Datapointer to the MeasureData_t structure to read data in to
Returns:
0 on Success

Definition at line 3296 of file vl6180x_class.cpp.

virtual int GetRange ( int32_t *  piData ) [virtual, inherited]

Get ranging result and only that.

Function Description
Unlike VL6180x_RangeGetMeasurement() this function only retrieves the range in millimeter
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:
pRange_mmPointer to range distance
Returns:
0 on success

Implements RangeSensor.

Definition at line 411 of file vl6180x_class.h.

uint16_t GetUpperLimit (  ) [inherited]

Get the maximal distance for actual scaling.

Function Description
Do not use prior to VL6180x_Prepare() or at least VL6180x_InitData()

Any range value more than the value returned by this function is to be considered as "no target detected" or "no target in detectable range"

Warning:
The maximal distance depends on the scaling
Returns:
The maximal range limit for actual mode and scaling

Definition at line 644 of file vl6180x_class.h.

int HandleIRQ ( OperatingMode  operating_mode,
MeasureData_t *  Data 
) [inherited]

Interrupt handling func to be called by user after an INT is occourred.

Parameters:
[in]opeating_modeindicating the in progress measure
[out]Datapointer to the MeasureData_t structure to read data in to
Returns:
0 on Success

Definition at line 3202 of file vl6180x_class.cpp.

virtual int Init (  ) [virtual, inherited]

One time device initialization.

To be called once and only once after device is brought out of reset (Chip enable) and booted see VL6180x_WaitDeviceBooted()

Function Description
When not used after a fresh device "power up" or reset, it may return CALIBRATION_WARNING meaning wrong calibration data may have been fetched from device that can result in ranging offset error
If application cannot execute device reset or need to run VL6180x_InitData multiple time then it must ensure proper offset calibration saving and restore on its own by using VL6180x_GetOffsetCalibrationData() on first power up and then VL6180x_SetOffsetCalibrationData() all all subsequent init
Parameters:
void
Returns:
0 on success, CALIBRATION_WARNING if failed

Implements GenericSensor.

Definition at line 253 of file vl6180x_class.h.

int InitSensor ( uint8_t  NewAddr ) [inherited]

Initialize the sensor with default values.

Returns:
0 on Success

Definition at line 2701 of file vl6180x_class.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 293 of file vl6180x_class.h.

int RangeConfigInterrupt ( uint8_t  ConfigGpioInt ) [inherited]

Configure ranging interrupt reported to application.

Parameters:
ConfigGpioIntSelect ranging report
select one (and only one) of:
CONFIG_GPIO_INTERRUPT_DISABLED
CONFIG_GPIO_INTERRUPT_LEVEL_LOW
CONFIG_GPIO_INTERRUPT_LEVEL_HIGH
CONFIG_GPIO_INTERRUPT_OUT_OF_WINDOW
CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY
Returns:
0 on success

Definition at line 427 of file vl6180x_class.h.

int RangeGetInterruptStatus ( uint8_t *  pIntStatus ) [inherited]

Return ranging error interrupt status.

Function Description
Appropriate Interrupt report must have been selected first by VL6180x_RangeConfigInterrupt() or VL6180x_Prepare()

Can be used in polling loop to wait for a given ranging event or in interrupt to read the trigger
Events triggers are :
RES_INT_STAT_GPIO_LOW_LEVEL_THRESHOLD
RES_INT_STAT_GPIO_HIGH_LEVEL_THRESHOLD
RES_INT_STAT_GPIO_OUT_OF_WINDOW
(RES_INT_STAT_GPIO_LOW_LEVEL_THRESHOLD|RES_INT_STAT_GPIO_HIGH_LEVEL_THRESHOLD) RES_INT_STAT_GPIO_NEW_SAMPLE_READY

See also:
IntrStatus_t
Parameters:
pIntStatusPointer to status variable to update
Returns:
0 on success

Definition at line 449 of file vl6180x_class.h.

int RangeGetMeasurement ( VL6180x_RangeData_t pRangeData ) [inherited]

Retrieve range measurements set from device.

Function Description
The measurement is made of range_mm status and error code VL6180x_RangeData_t
Based on configuration selected extra measures are included.
Warning:
should not be used in continuous if wrap around filter is active
Does not perform any wait nor check for result availability or validity.
See also:
VL6180x_RangeGetResult for "range only" measurement
Parameters:
pRangeDataPointer to the data structure to fill up
Returns:
0 on success

Definition at line 393 of file vl6180x_class.h.

int RangeGetMeasurementIfReady ( VL6180x_RangeData_t pRangeData ) [inherited]

Check for measure readiness and get it if ready.

Function Description
Using this function is an alternative to VL6180x_RangePollMeasurement() to avoid polling operation. This is suitable for applications where host CPU is triggered on a interrupt (not from VL6180X) to perform ranging operation. In this scenario, we assume that the very first ranging operation is triggered by a call to VL6180x_RangeStartSingleShot(). Then, host CPU regularly calls VL6180x_RangeGetMeasurementIfReady() to get a distance measure if ready. In case the distance is not ready, host may get it at the next call.
Warning:
This function does not re-start a new measurement : this is up to the host CPU to do it.
This function clears Range Interrupt for measure ready , but not error interrupts. For that, uses VL6180x_ClearErrorInterrupt()
Parameters:
pRangeDataWill be populated with the result ranging data if available
Returns:
0 when measure is ready pRange data is updated (untouched when not ready), >0 for warning and NOT_READY if measurement not yet ready, <0 for error RANGE_ERROR if device report an error,

Definition at line 374 of file vl6180x_class.h.

int RangeGetThresholds ( uint16_t *  low,
uint16_t *  high 
) [inherited]

Get scaled high and low threshold from device.

Function Description
Due to scaling factor, the returned value may be different from what has been programmed first (precision lost). For instance VL6180x_RangeSetThresholds(dev,11,22) with scale 3 will read back 9 ((11/3)x3) and 21 ((22/3)x3).
Parameters:
lowscaled low Threshold ptr can be NULL if not needed
highscaled High Threshold ptr can be NULL if not needed
Returns:
0 on success, return value is undefined if both low and high are NULL
Warning:
return value is undefined if both low and high are NULL

Definition at line 683 of file vl6180x_class.h.

int RangePollMeasurement ( VL6180x_RangeData_t pRangeData ) [inherited]

Single shot Range measurement in polling mode.

Function Description
Kick off a new single shot range then wait for ready to retrieve it by polling interrupt status
Ranging must be prepared by a first call to VL6180x_Prepare() and it is safer to clear very first poll call
This function reference VL6180x_PollDelay(dev) porting macro/call on each polling loop, but PollDelay(dev) may never be called if measure in ready on first poll loop
Should not be use in continuous mode operation as it will stop it and cause stop/start misbehaviour

This function clears Range Interrupt status , but not error one. For that uses VL6180x_ClearErrorInterrupt()
This range error is not related VL6180x_RangeData_t::errorStatus that refer measure status
Parameters:
pRangeDataWill be populated with the result ranging data VL6180x_RangeData_t
Returns:
0 on success , RANGE_ERROR if device reports an error case in it status (not cleared) use
See also:
VL6180x_RangeData_t

Definition at line 353 of file vl6180x_class.h.

int RangeSetEceFactor ( uint16_t  FactorM,
uint16_t  FactorD 
) [inherited]

Set Early Convergence Estimate ratio.

Function Description
For more information on ECE check datasheet
Warning:
May return a calibration warning in some use cases
Parameters:
FactorMECE factor M in M/D
FactorDECE factor D in M/D
Returns:
0 on success. <0 on error. >0 on warning

Definition at line 710 of file vl6180x_class.h.

int RangeSetEceState ( int  enable ) [inherited]

Set Early Convergence Estimate state (See SYSRANGE_RANGE_CHECK_ENABLES register)

Parameters:
enableState to be set 0=disabled, otherwise enabled
Returns:
0 on success

Definition at line 720 of file vl6180x_class.h.

int RangeSetInterMeasPeriod ( uint32_t  InterMeasTime_msec ) [inherited]

Program Inter measurement period (used only in continuous mode)

Function Description
When trying to set too long time, it returns INVALID_PARAMS
Parameters:
InterMeasTime_msecRequires inter-measurement time in msec
Returns:
0 on success

Definition at line 594 of file vl6180x_class.h.

int RangeSetMaxConvergenceTime ( uint8_t  MaxConTime_msec ) [inherited]

Set maximum convergence time.

Function Description
Setting a low convergence time can impact maximal detectable distance. Refer to VL6180x Datasheet Table 7 : Typical range convergence time. A typical value for up to x3 scaling is 50 ms
Parameters:
MaxConTime_msec
Returns:
0 on success. <0 on error. >0 for calibration warning status

Definition at line 331 of file vl6180x_class.h.

int RangeSetRawThresholds ( uint8_t  low,
uint8_t  high 
) [inherited]

Set ranging raw thresholds (scaling not considered so not recommended to use it)

Parameters:
lowraw low threshold set to raw register
highraw high threshold set to raw register
Returns:
0 on success

Definition at line 695 of file vl6180x_class.h.

int RangeSetSystemMode ( uint8_t  mode ) [inherited]

Set ranging mode and start/stop measure (use high level functions instead : VL6180x_RangeStartSingleShot() or VL6180x_RangeStartContinuousMode())

Function Description
When used outside scope of known polling single shot stopped state,
user must ensure the device state is "idle" before to issue a new command.
Parameters:
modeA combination of working mode (MODE_SINGLESHOT or MODE_CONTINUOUS) and start/stop condition (MODE_START_STOP)
Returns:
0 on success

Definition at line 773 of file vl6180x_class.h.

int RangeSetThresholds ( uint16_t  low,
uint16_t  high,
int  SafeHold 
) [inherited]

Apply low and high ranging thresholds that are considered only in continuous mode.

Function Description
This function programs low and high ranging thresholds that are considered in continuous mode : interrupt will be raised only when an object is detected at a distance inside this [low:high] range. The function takes care of applying current scaling factor if any.
To be safe, in continuous operation, thresholds must be changed under "group parameter hold" cover. Group hold can be activated/deactivated directly in the function or externally (then set 0) using /a VL6180x_SetGroupParamHold() function.
Parameters:
lowLow threshold in mm
highHigh threshold in mm
SafeHoldUse of group parameters hold to surround threshold programming.
Returns:
0 On success

Definition at line 665 of file vl6180x_class.h.

int RangeStartContinuousMode (  ) [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 304 of file vl6180x_class.h.

int RangeStartSingleShot (  ) [inherited]

Start single shot ranging measure.

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

Returns:
0 on success

Definition at line 315 of file vl6180x_class.h.

int RangeWaitDeviceReady ( int  MaxLoop ) [inherited]

Wait for device to be ready (before a new ranging command can be issued by application)

Parameters:
MaxLoopMax Number of i2c polling loop see msec_2_i2cloop
Returns:
0 on success. <0 when fail
VL6180x_ErrCode_t::TIME_OUT for time out
VL6180x_ErrCode_t::INVALID_PARAMS if MaxLop<1

Definition at line 580 of file vl6180x_class.h.

int SetupGPIO1 ( uint8_t  InitFunction,
int  ActiveHigh 
) [inherited]

Configure GPIO1 function and set polarity.

Function Description
To be used prior to arm single shot measure or start continuous mode.

The function uses VL6180x_SetupGPIOx() for setting gpio 1.

Warning:
changing polarity can generate a spurious interrupt on pins. It sets an interrupt flags condition that must be cleared to avoid polling hangs.
It is safe to run VL6180x_ClearAllInterrupt() just after.
Parameters:
IntFunctionThe interrupt functionality to use one of :
GPIOx_SELECT_OFF
GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT
ActiveHighThe interrupt line polarity see IntrPol_e use INTR_POL_LOW (falling edge) or INTR_POL_HIGH (rising edge)
Returns:
0 on success

Definition at line 275 of file vl6180x_class.h.

int StartMeasurement ( OperatingMode  operating_mode,
void(*)(void)  fptr,
uint16_t  low,
uint16_t  high 
) [inherited]

Start the measure indicated by operating mode.

Parameters:
[in]operating_modespecifies requested measure
[in]fptrspecifies call back function must be !NULL in case of interrupt measure
[in]lowspecifies measure low threashold in Lux or in mm according to measure
[in]highspecifies measure high threashold in Lux or in mm according to measure
Returns:
0 on Success

Definition at line 2746 of file vl6180x_class.cpp.

int StaticInit (  ) [inherited]

Low level ranging and ALS register static settings (you should call VL6180x_Prepare() function instead)

Returns:
0 on success

Definition at line 568 of file vl6180x_class.h.

int StopMeasurement ( OperatingMode  operating_mode ) [inherited]

Stop the currently running measure indicate by operating_mode.

Parameters:
[in]operating_modespecifies requested measure to stop
Returns:
0 on Success

Definition at line 3522 of file vl6180x_class.cpp.

int UpscaleGetScaling (  ) [inherited]

Get current ranging scaling factor.

Returns:
The current scaling factor

Definition at line 628 of file vl6180x_class.h.

int UpscaleSetScaling ( uint8_t  scaling ) [inherited]

Set device ranging scaling factor.

Function Description
The ranging scaling factor is applied on the raw distance measured by the device to increase operating ranging at the price of the precision. Changing the scaling factor when device is not in f/w standby state (free running) is not safe. It can be source of spurious interrupt, wrongly scaled range etc ...
Warning:
__This function doesns't update high/low threshold and other programmed settings linked to scaling factor__. To ensure proper operation, threshold and scaling changes should be done following this procedure:
  • Set Group hold : VL6180x_SetGroupParamHold()
  • Get Threshold VL6180x_RangeGetThresholds()
  • Change scaling : VL6180x_UpscaleSetScaling()
  • Set Threshold : VL6180x_RangeSetThresholds()
  • Unset Group Hold : VL6180x_SetGroupParamHold()
Parameters:
scalingScaling factor to apply (1,2 or 3)
Returns:
0 on success when up-scale support is not configured it fail for any scaling than the one statically configured.

Definition at line 618 of file vl6180x_class.h.

int WaitDeviceBooted (  ) [inherited]

Wait for device booted after chip enable (hardware standby)

Function Description
After Chip enable Application you can also simply wait at least 1ms to ensure device is ready
Warning:
After device chip enable (gpio0) de-asserted user must wait gpio1 to get asserted (hardware standby). or wait at least 400usec prior to do any low level access or api call .

This function implements polling for standby but you must ensure 400usec from chip enable passed

Warning:
if device get prepared VL6180x_Prepare() re-using these function can hold indefinitely
Parameters:
void
Returns:
0 on success

Definition at line 232 of file vl6180x_class.h.


Variable Documentation

const uint16_t AlsGainLookUp [8] ROMABLE_DATA = { 253, 127, 84} [static]

ScalerLookUP scaling factor-1 to register RANGE_SCALER lookup.

Als Code gain to fix point gain lookup.

scaling factor to Upper limit look up

Definition at line 167 of file vl6180x_class.cpp.

struct VL6180xDevData_t VL6180x_DEV_DATA_ATTR SingleVL6180xDevData
Initial value:
{
        .EceFactorM        = DEF_ECE_FACTOR_M,
        .EceFactorD        = DEF_ECE_FACTOR_D,
#ifdef VL6180x_HAVE_UPSCALE_DATA
        .UpscaleFactor     = DEF_UPSCALE,
#endif
#ifdef VL6180x_HAVE_ALS_DATA
        .IntegrationPeriod = DEF_INT_PEFRIOD,
        .AlsGainCode       = DEF_ALS_GAIN,
        .AlsScaler         = DEF_ALS_SCALER,
#endif
#ifdef VL6180x_HAVE_DMAX_RANGING
        .DMaxEnable =   DEF_DMAX_ENABLE,
#endif
}

the unique driver data When single device driver is active

Definition at line 239 of file vl6180x_class.cpp.