Code petit robot

Dependencies:   X_NUCLEO_COMMON X_NUCLEO_IHM01A1 mbed

Embed: (wiki syntax)

« Back to documentation index

ALS functions

ALS functions

ALS functions. More...

Modules

 Misc functions
 

Misc functions.


 Interrupts management functions
 

Interrupts management functions.


Functions

int AlsWaitDeviceReady (int MaxLoop)
 Wait for device to be ready for new als operation or max pollign loop (time out)
int AlsSetSystemMode (uint8_t mode)
 Set ALS system mode and start/stop measure.
virtual int GetLight (uint32_t *piData)
 Get the ALS (light in Lux) level.
int AlsStartContinuousMode ()
 Start the ALS (light) measure in continous mode.
int AlsStartSingleShot ()
 Start the ALS (light) measure in single shot mode.

Detailed Description

ALS functions.


Function Documentation

int AlsSetSystemMode ( uint8_t  mode ) [inherited]

Set ALS system mode and start/stop measure.

Warning:
When used outside after single shot polling,
User must ensure the device state is ready before issuing a new command (using VL6180x_AlsWaitDeviceReady()).
Non respect of this, can cause loss of interrupt or device hanging.
Parameters:
modeA combination of working mode (MODE_SINGLESHOT or MODE_CONTINUOUS) and start condition (MODE_START_STOP)
Returns:
0 on success

Definition at line 849 of file vl6180x_class.h.

int AlsStartContinuousMode (  ) [inherited]

Start the ALS (light) measure in continous mode.

Function Description
Start the ALS (light) measure in continous mode
Returns:
0 On success

Definition at line 1024 of file vl6180x_class.h.

int AlsStartSingleShot (  ) [inherited]

Start the ALS (light) measure in single shot mode.

Function Description
Start the ALS (light) measure in single shot mode
Returns:
0 On success

Definition at line 1036 of file vl6180x_class.h.

int AlsWaitDeviceReady ( int  MaxLoop ) [inherited]

Wait for device to be ready for new als operation or max pollign loop (time out)

Parameters:
MaxLoopMax Number of i2c polling loop see msec_2_i2cloop
Returns:
0 on success. <0 when VL6180x_ErrCode_t::TIME_OUT if timed out

Definition at line 834 of file vl6180x_class.h.

virtual int GetLight ( uint32_t *  piData ) [virtual, inherited]

Get the ALS (light in Lux) level.

Function Description
Get the ALS (light in Lux) level
Parameters:
*piDataThe pointer to variable to write in the measure in Lux
Returns:
0 On success

Implements LightSensor.

Definition at line 1012 of file vl6180x_class.h.