Librairie adaptée au laboratoire 2
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
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:
-
mode A combination of working mode (MODE_SINGLESHOT or MODE_CONTINUOUS) and start condition (MODE_START_STOP)
- Returns:
- 0 on success
int als_start_continuous_mode | ( | ) | [inherited] |
int als_start_single_shot | ( | ) | [inherited] |
int als_wait_device_ready | ( | int | MaxLoop ) | [inherited] |
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
Generated on Fri Jul 15 2022 16:10:34 by 1.7.2