|
RocketLogger
1.1.6
|
Include dependency graph for sensor.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | rl_sensor |
Macros | |
| #define | MAX_MESSAGE_LENGTH 1000 |
| #define | I2C_BUS_FILENAME "/dev/i2c-1" |
| #define | SENSOR_REGISTRY_SIZE 5 |
| Number of sensor registred. More... | |
| #define | SENSOR_NAME_LENGTH (RL_FILE_CHANNEL_NAME_LENGTH) |
Functions | |
| int | Sensors_initSharedBus (void) |
| void | Sensors_closeSharedBus (void) |
| int | Sensors_getSharedBus (void) |
| int | Sensors_initSharedComm (uint8_t) |
| int | Sensors_openBus (void) |
| int | Sensors_closeBus (int) |
| int | Sensors_scan (int *) |
| void | Sensors_close (int *) |
Variables | |
| const struct rl_sensor | sensor_registry [SENSOR_REGISTRY_SIZE] |
| #define I2C_BUS_FILENAME "/dev/i2c-1" |
Definition at line 42 of file sensor.h.
Referenced by Sensors_openBus().
| #define MAX_MESSAGE_LENGTH 1000 |
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 39 of file sensor.h.
Referenced by Sensors_scan().
| #define SENSOR_NAME_LENGTH (RL_FILE_CHANNEL_NAME_LENGTH) |
| #define SENSOR_REGISTRY_SIZE 5 |
Number of sensor registred.
Definition at line 46 of file sensor.h.
Referenced by ambient_setup_channels(), ambient_store_data(), Sensors_close(), and Sensors_scan().
| void Sensors_close | ( | int * | ) |
| int Sensors_closeBus | ( | int | bus | ) |
Close a I2C sensor bus.
| bus | The I2C bus to close |
Definition at line 98 of file sensor.c.
References rl_sensor::close, ERROR, and rl_log().
Referenced by Sensors_closeSharedBus().
Here is the call graph for this function:| void Sensors_closeSharedBus | ( | void | ) |
Close the shared I2C sensor bus.
Definition at line 134 of file sensor.c.
References sensor_bus, and Sensors_closeBus().
Referenced by hw_close().
Here is the call graph for this function:| int Sensors_getSharedBus | ( | void | ) |
Get the shared I2C bus handle.
Definition at line 119 of file sensor.c.
References sensor_bus.
Referenced by BME280_getID(), BME280_init(), BME280_read(), BME280_readCalibration(), BME280_setParameters(), TSL4531_getID(), TSL4531_init(), TSL4531_read(), TSL4531_sendRange(), and TSL4531_setParameters().
| int Sensors_initSharedBus | ( | void | ) |
Initialize the shared I2C sensor bus.
Definition at line 110 of file sensor.c.
References sensor_bus, and Sensors_openBus().
Referenced by hw_init().
Here is the call graph for this function:| int Sensors_initSharedComm | ( | uint8_t | device_address | ) |
Initiate an I2C communication with a device.
| sensor_address | The I2C address of the device |
Definition at line 126 of file sensor.c.
References sensor_bus.
Referenced by BME280_init(), BME280_read(), TSL4531_init(), and TSL4531_read().
| int Sensors_openBus | ( | void | ) |
Open a new handle of the I2C bus.
Definition at line 85 of file sensor.c.
References ERROR, I2C_BUS_FILENAME, and rl_log().
Referenced by Sensors_initSharedBus().
Here is the call graph for this function:| int Sensors_scan | ( | int * | ) |
| const struct rl_sensor sensor_registry[SENSOR_REGISTRY_SIZE] |
The sensor registry structure.
Register your sensor (channels) here. Multiple channels from the same sensor should be added as consecutive entries.
Definition at line 53 of file sensor.c.
Referenced by ambient_setup_channels(), and ambient_store_data().