|
RocketLogger
1.1.6
|
Include dependency graph for tsl4531.c:Go to the source code of this file.
Functions | |
| int | TSL4531_init (int sensor_identifier) |
| void | TSL4531_close (int sensor_identifier) |
| int | TSL4531_read (int sensor_identifier) |
| int32_t | TSL4531_getValue (int sensor_identifier, int channel) |
| int | TSL4531_setRange (int sensor_identifier, int range) |
| int | TSL4531_getRange (int sensor_identifier) |
| int | TSL4531_getID (void) |
| int | TSL4531_setParameters (int sensor_identifier) |
| int | TSL4531_sendRange (int sensor_identifier, int range) |
| int | TSL4531_getIndex (int sensor_identifier) |
Variables | |
| const int | TSL4531_sensors [] = TSL4531_I2C_ADDRESSES |
| enum TSL4531_range | TSL4531_range [sizeof(TSL4531_sensors)] |
| enum TSL4531_range | TSL4531_auto_range [sizeof(TSL4531_sensors)] |
| uint8_t | TSL4531_multiplier [sizeof(TSL4531_sensors)] = {TSL4531_MULT_200} |
| int32_t | TSL4531_values [sizeof(TSL4531_sensors)] = {0} |
| void TSL4531_close | ( | int | sensor_identifier | ) |
| int TSL4531_getID | ( | void | ) |
Get the device ID
| sensor_identifier | The I2C address of the sensor |
Definition at line 217 of file tsl4531.c.
References ERROR, rl_log(), sensor_bus, Sensors_getSharedBus(), TSL4531_COMMAND, and TSL4531_REG_ID.
Referenced by TSL4531_init().
Here is the call graph for this function:| int TSL4531_getIndex | ( | int | sensor_identifier | ) |
Get the index of the sensor with specified address.
| sensor_identifier | The sensor address used to look up the index |
Definition at line 323 of file tsl4531.c.
References TSL4531_sensors.
Referenced by TSL4531_getRange(), TSL4531_getValue(), TSL4531_read(), TSL4531_sendRange(), and TSL4531_setRange().
| int TSL4531_getRange | ( | int | sensor_identifier | ) |
Get current range
| sensor_identifier | The I2C address of the sensor |
Definition at line 202 of file tsl4531.c.
References TSL4531_auto_range, TSL4531_getIndex(), and TSL4531_RANGE_AUTO.
Here is the call graph for this function:| int32_t TSL4531_getValue | ( | int | sensor_identifier, |
| int | channel | ||
| ) |
Get the values read from the sensor
| sensor_identifier | The I2C address of the sensor |
| channel | The channel of the sensor to get |
Definition at line 167 of file tsl4531.c.
References TSL4531_getIndex(), and TSL4531_values.
Here is the call graph for this function:| int TSL4531_init | ( | int | sensor_identifier | ) |
Initialize the light sensor
| sensor_identifier | The I2C address of the sensor |
Definition at line 52 of file tsl4531.c.
References ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), Sensors_initSharedComm(), SUCCESS, TSL4531_getID(), TSL4531_ID, and TSL4531_setParameters().
Here is the call graph for this function:| int TSL4531_read | ( | int | sensor_identifier | ) |
Read the sensor values.
| sensor_identifier | The I2C address of the sensor |
Definition at line 97 of file tsl4531.c.
References ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), Sensors_initSharedComm(), SUCCESS, TSL4531_auto_range, TSL4531_COMMAND, TSL4531_getIndex(), TSL4531_multiplier, TSL4531_RANGE_AUTO, TSL4531_RANGE_HIGH, TSL4531_RANGE_HYSTERESIS, TSL4531_RANGE_LOW, TSL4531_RANGE_LOW_MAX, TSL4531_RANGE_MEDIUM, TSL4531_RANGE_MEDIUM_MAX, TSL4531_REG_DATALOW, TSL4531_sendRange(), and TSL4531_values.
Here is the call graph for this function:| int TSL4531_sendRange | ( | int | sensor_identifier, |
| int | range | ||
| ) |
Configure the range of the sensor.
| sensor_identifier | The I2C address of the sensor |
| range | The range TSL4531_range to set |
Definition at line 262 of file tsl4531.c.
References ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), SUCCESS, TSL4531_auto_range, TSL4531_COMMAND, TSL4531_getIndex(), TSL4531_INT_TIME_100, TSL4531_INT_TIME_200, TSL4531_INT_TIME_400, TSL4531_LOW_POWER, TSL4531_MULT_100, TSL4531_MULT_200, TSL4531_MULT_400, TSL4531_multiplier, TSL4531_RANGE_AUTO, TSL4531_RANGE_HIGH, TSL4531_RANGE_LOW, TSL4531_RANGE_MEDIUM, and TSL4531_REG_CONFIG.
Referenced by TSL4531_read(), and TSL4531_setRange().
Here is the call graph for this function:| int TSL4531_setParameters | ( | int | sensor_identifier | ) |
Set the sensor parameter to default for continuous sensing.
| sensor_identifier | The I2C address of the sensor |
Definition at line 234 of file tsl4531.c.
References ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), SUCCESS, TSL4531_COMMAND, TSL4531_RANGE_AUTO, TSL4531_REG_CONTROL, TSL4531_SAMPLE_CONTINUOUS, and TSL4531_setRange().
Referenced by TSL4531_init().
Here is the call graph for this function:| int TSL4531_setRange | ( | int | sensor_identifier, |
| int | range | ||
| ) |
Set range of light sensor
| sensor_identifier | The I2C address of the sensor |
| range | The range TSL4531_range to set |
Definition at line 183 of file tsl4531.c.
References ERROR, FAILURE, rl_log(), SUCCESS, TSL4531_getIndex(), and TSL4531_sendRange().
Referenced by TSL4531_setParameters().
Here is the call graph for this function:| enum TSL4531_range TSL4531_auto_range[sizeof(TSL4531_sensors)] |
Definition at line 42 of file tsl4531.c.
Referenced by TSL4531_getRange(), TSL4531_read(), and TSL4531_sendRange().
| uint8_t TSL4531_multiplier[sizeof(TSL4531_sensors)] = {TSL4531_MULT_200} |
Definition at line 44 of file tsl4531.c.
Referenced by TSL4531_read(), and TSL4531_sendRange().
| enum TSL4531_range TSL4531_range[sizeof(TSL4531_sensors)] |
| const int TSL4531_sensors[] = TSL4531_I2C_ADDRESSES |
Copyright (c) 2016-2019, Swiss Federal Institute of Technology (ETH Zurich) All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 38 of file tsl4531.c.
Referenced by TSL4531_getIndex().
| int32_t TSL4531_values[sizeof(TSL4531_sensors)] = {0} |
Definition at line 45 of file tsl4531.c.
Referenced by TSL4531_getValue(), and TSL4531_read().