Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mDotEVBM2X MTDOT-EVBDemo-DRH MTDOT-BOX-EVB-Factory-Firmware-LIB-108 MTDOT-UDKDemo_Senet ... more
ISL29011 Class Reference
Using the Multitech MTDOT-EVB. More...
#include <ISL29011.h>
Public Types | |
| enum | INT_PERSIST |
Number of cycles measurement needs to be out of threshold to generate an interrupt. More... | |
| enum | PROX_SCHEME |
Dynamic Range scheme for IR proximity. More... | |
| enum | MOD_FREQ |
Modulation frequency of Proximity LED. More... | |
| enum | LED_DRIVE |
Sets the drive current of the IR Proximity LED. More... | |
| enum | ADC_RESOLUTION |
Measurement resolution for ADC. More... | |
| enum | LUX_RANGE |
Setting for LUX Range of ADC. More... | |
| enum | REGISTER |
The device register map. More... | |
Public Member Functions | |
| ISL29011 (I2C &i2c, InterruptIn *isl_int=NULL) | |
| Create the ISL29011 object. | |
| uint16_t | getData (void) |
| Get the data. | |
| uint8_t | setMode (OPERATION_MODE op_mode) const |
| Setup the ISL29011 measurement mode - Operating moe of sensor using the OPERATION_MODE enum. | |
| uint8_t | setPersistence (INT_PERSIST int_persist) const |
| Set Interrupt Threshold persistence - Sets the Interrupt Persistence Threshold using the INT_PERSIST enum. | |
| uint8_t | setProximity (PROX_SCHEME prox_scheme, MOD_FREQ mod_freq, LED_DRIVE led_drive) const |
| Set Proximity measurement parameters - Sets the Proximity measurement scheme using the PROX_SCHEME enum - Sets the Moduletion Frequency using the MOD_FREQ enum - Sets the LED Drive current for Proximity mode using the LED_DRIVE enum. | |
| uint8_t | setResolution (ADC_RESOLUTION adc_resolution) const |
| Set ADC Resolution - Sets the ADC resolution using the ADC_RESOLUTION enum. | |
| uint8_t | setRange (LUX_RANGE lux_range) const |
| Set the LUX Full Scale measurement range - Sets the maximum measured Lux value usngthe LUX_RANGE enum. | |
Static Public Attributes | |
| static uint8_t const | INT_FLG = 0x04 |
| INT_FLG. | |
| static uint32_t const | CT_16BIT = 90000 |
| CT_16BIT. | |
| static uint32_t const | CT_12BIT = 5630 |
| CT_12BIT. | |
| static uint32_t const | CT_8BIT = 351 |
| CT_8BIT. | |
| static uint32_t const | CT_4BIT = 22 |
| CT_4BIT. | |
Detailed Description
Using the Multitech MTDOT-EVB.
Example:
#include "mbed.h" #include "ISL29011.h" int main() { }
API abstraction for the ISL29011 Ambient Light/Proximity IC initial version will be polling only. Interrupt service and rtos support will be added at a later point
Definition at line 51 of file ISL29011.h.
Member Enumeration Documentation
| enum ADC_RESOLUTION |
Measurement resolution for ADC.
Definition at line 147 of file ISL29011.h.
| enum INT_PERSIST |
Number of cycles measurement needs to be out of threshold to generate an interrupt.
Definition at line 105 of file ISL29011.h.
| enum LED_DRIVE |
Sets the drive current of the IR Proximity LED.
Definition at line 135 of file ISL29011.h.
| enum LUX_RANGE |
Setting for LUX Range of ADC.
Definition at line 159 of file ISL29011.h.
| enum MOD_FREQ |
Modulation frequency of Proximity LED.
Definition at line 125 of file ISL29011.h.
| enum PROX_SCHEME |
Dynamic Range scheme for IR proximity.
Definition at line 115 of file ISL29011.h.
| enum REGISTER |
The device register map.
Definition at line 171 of file ISL29011.h.
Constructor & Destructor Documentation
| ISL29011 | ( | I2C & | i2c, |
| InterruptIn * | isl_int = NULL |
||
| ) |
Create the ISL29011 object.
- Parameters:
-
i2c - A defined I2C object InterruptIn* - pointer to a defined InterruptIn object. Default to NULL if polled
Definition at line 28 of file ISL29011.cpp.
Member Function Documentation
| uint16_t getData | ( | void | ) |
Get the data.
- Returns:
- The last valid LUX reading from the ambient light sensor
Definition at line 67 of file ISL29011.cpp.
| uint8_t setMode | ( | OPERATION_MODE | op_mode ) | const |
Setup the ISL29011 measurement mode - Operating moe of sensor using the OPERATION_MODE enum.
Setup the ISL29011 measurement mode.
- Returns:
- status of command
Definition at line 81 of file ISL29011.cpp.
| uint8_t setPersistence | ( | INT_PERSIST | int_persist ) | const |
Set Interrupt Threshold persistence - Sets the Interrupt Persistence Threshold using the INT_PERSIST enum.
Set Interrupt Persistence Threshold.
- Returns:
- status of command TODO - Still need to add interrupt support code
- status of command
Definition at line 98 of file ISL29011.cpp.
| uint8_t setProximity | ( | PROX_SCHEME | prox_scheme, |
| MOD_FREQ | mod_freq, | ||
| LED_DRIVE | led_drive | ||
| ) | const |
Set Proximity measurement parameters - Sets the Proximity measurement scheme using the PROX_SCHEME enum - Sets the Moduletion Frequency using the MOD_FREQ enum - Sets the LED Drive current for Proximity mode using the LED_DRIVE enum.
Set Proximity measurement parameters.
- Returns:
- status of command NOTE: function added for completeness. MTDOT-EVB does not have IR LED installed at this time
- status of command
Definition at line 114 of file ISL29011.cpp.
| uint8_t setRange | ( | LUX_RANGE | lux_range ) | const |
Set the LUX Full Scale measurement range - Sets the maximum measured Lux value usngthe LUX_RANGE enum.
Set the LUX Full Scale measurement range.
- Returns:
- status of command
Definition at line 146 of file ISL29011.cpp.
| uint8_t setResolution | ( | ADC_RESOLUTION | adc_resolution ) | const |
Set ADC Resolution - Sets the ADC resolution using the ADC_RESOLUTION enum.
Set ADC Resolution.
- Returns:
- status of command
Definition at line 130 of file ISL29011.cpp.
Field Documentation
uint32_t const CT_12BIT = 5630 [static] |
uint32_t const CT_16BIT = 90000 [static] |
uint32_t const CT_4BIT = 22 [static] |
uint32_t const CT_8BIT = 351 [static] |
uint8_t const INT_FLG = 0x04 [static] |
Generated on Tue Jul 12 2022 18:25:00 by
1.7.2