![]() |
IoT Drivers
v3.3.0 (S2022)
Engineering in Software Technology
|
Driver for a TSL2591 Light sensor. More...
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | tsl2591_combinedData_t |
TSL2591 Light measure data struct. More... | |
Enumerations | |
enum | tsl2591_gain_t { TSL2591_GAIN_LOW = 0x00, TSL2591_GAIN_MED = 0x10, TSL2591_GAIN_HIGH = 0x20, TSL2591_GAIN_MAX = 0x30 } |
TSL2591 Gain configuration. More... | |
enum | tsl2591_integrationTime_t { TSL2591_INTEGRATION_TIME_100MS = 0x00, TSL2591_INTEGRATION_TIME_200MS = 0x01, TSL2591_INTEGRATION_TIME_300MS = 0x02, TSL2591_INTEGRATION_TIME_400MS = 0x03, TSL2591_INTEGRATION_TIME_500MS = 0x04, TSL2591_INTEGRATION_TIME_600MS = 0x05 } |
TSL2591 Integration time configuration. More... | |
enum | tsl2591_returnCode_t { TSL2591_OK, TSL2591_DATA_READY, TSL2591_DEV_ID_READY, TSL2591_OVERFLOW, TSL2591_UNDERFLOW, TSL2591_BUSY, TSL2591_ERROR, TSL2591_DRIVER_NOT_INITIALISED, TSL2591_OUT_OF_HEAP } |
TSL2591 Driver return codes. More... | |
Functions | |
tsl2591_returnCode_t | tsl2591_initialise (void(*callBack)(tsl2591_returnCode_t)) |
Initialise the driver. More... | |
tsl2591_returnCode_t | tsl2591_destroy (void) |
Destroy the TSL2591 driver. More... | |
tsl2591_returnCode_t | tsl2591_enable (void) |
Enable/Power up the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_disable (void) |
Disable/Power down the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_fetchDeviceId (void) |
Start fetching the TSL2591 sensor's device ID. More... | |
uint8_t | tsl2591_getDeviceId (void) |
Retrieve the TSL2591 sensor's device ID. More... | |
tsl2591_returnCode_t | tsl2591_setGainAndIntegrationTime (tsl2591_gain_t gain, tsl2591_integrationTime_t integrationTime) |
Sets the TSL2591 sensor's Gain and Integration time. More... | |
tsl2591_gain_t | tsl2591_getGain (void) |
Retrieve the TSL2591 sensor's current gain setting. More... | |
tsl2591_integrationTime_t | tsl2591_getIntegrationTime (void) |
Retrieve the TSL2591 sensor's current integration time. More... | |
tsl2591_returnCode_t | tsl2591_fetchData (void) |
Start fetching the TSL2591 sensor's light data. More... | |
tsl2591_returnCode_t | tsl259_getVisibleRaw (uint16_t *visible) |
Retrieve the latest visible light spectrum as raw data fetched from the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_getInfraredRaw (uint16_t *infrared) |
Retrieve the latest infrared light spectrum as raw data fetched from the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_getFullSpectrumRaw (uint16_t *fullSpectrum) |
Retrieve the latest full light spectrum as raw data fetched from the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_getCombinedDataRaw (tsl2591_combinedData_t *combinedData) |
Retrieve the latest combined light spectrum's as raw data fetched from the TSL2591 sensor. More... | |
tsl2591_returnCode_t | tsl2591_getLux (float *lux) |
Retrieve the latest visible light spectrum as lux fetched from the TSL2591 sensor. More... | |
Driver for a TSL2591 Light sensor.