Librairie adaptée au laboratoire 2

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

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 als_wait_device_ready (int MaxLoop)
 Wait for device to be ready for new als operation or max pollign loop (time out)
int als_set_system_mode (uint8_t mode)
 Set ALS system mode and start/stop measure.
virtual int get_lux (uint32_t *pi_data)
 Get a single light (in Lux) measure result.
int als_start_continuous_mode ()
 Start the ALS (light) measure in continous mode.
int als_start_single_shot ()
 Start the ALS (light) measure in single shot mode.

Detailed Description

ALS functions.


Function Documentation

int als_set_system_mode ( 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 965 of file VL6180X.h.

int als_start_continuous_mode (  ) [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 1137 of file VL6180X.h.

int als_start_single_shot (  ) [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 1149 of file VL6180X.h.

int als_wait_device_ready ( 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 950 of file VL6180X.h.

virtual int get_lux ( uint32_t *  pi_data ) [virtual, inherited]

Get a single light (in Lux) measure result.

Function Description
It can be called after having initialized a component. It start a single light measure in polling mode and wait until the measure is finisched. The function block until the measure is finished, it can blocks indefinitely in case the measure never ends for any reason

Definition at line 1114 of file VL6180X.h.