![]() |
LibDriver SFA30
|
driver sfa30 source file More...
#include "driver_sfa30.h"Go to the source code of this file.
Macros | |
| #define | CHIP_NAME "Sensirion SFA30" |
| chip information definition | |
| #define | MANUFACTURER_NAME "Sensirion" |
| #define | SUPPLY_VOLTAGE_MIN 3.15f |
| #define | SUPPLY_VOLTAGE_MAX 5.50f |
| #define | MAX_CURRENT 5.0f |
| #define | TEMPERATURE_MIN 0.0f |
| #define | TEMPERATURE_MAX 40.0f |
| #define | DRIVER_VERSION 1000 |
| #define | SFA30_ADDRESS (0x5D << 1) |
| chip address definition | |
| #define | SFA30_IIC_COMMAND_START_MEASUREMENT 0x0006U |
| chip command definition | |
| #define | SFA30_IIC_COMMAND_STOP_MEASUREMENT 0x0104U |
| #define | SFA30_IIC_COMMAND_READ_MEASURED_VALUES 0x0327U |
| #define | SFA30_IIC_COMMAND_READ_DEVICE_INFORMATION 0xD060U |
| #define | SFA30_IIC_COMMAND_RESET 0xD304U |
| #define | SFA30_UART_COMMAND_START_MEASUREMENT 0x00 |
| #define | SFA30_UART_COMMAND_STOP_MEASUREMENT 0x01 |
| #define | SFA30_UART_COMMAND_READ_MEASURED_VALUES 0x03 |
| #define | SFA30_UART_COMMAND_READ_DEVICE_INFORMATION 0xD0 |
| #define | SFA30_UART_COMMAND_RESET 0xD3 |
Functions | |
| uint8_t | sfa30_set_interface (sfa30_handle_t *handle, sfa30_interface_t interface) |
| set the chip interface | |
| uint8_t | sfa30_get_interface (sfa30_handle_t *handle, sfa30_interface_t *interface) |
| get the chip interface | |
| uint8_t | sfa30_start_measurement (sfa30_handle_t *handle) |
| start the measurement | |
| uint8_t | sfa30_stop_measurement (sfa30_handle_t *handle) |
| stop the measurement | |
| uint8_t | sfa30_get_device_information (sfa30_handle_t *handle, char info[32]) |
| get device information | |
| uint8_t | sfa30_reset (sfa30_handle_t *handle) |
| reset the chip | |
| uint8_t | sfa30_read (sfa30_handle_t *handle, sfa30_data_t *data) |
| read the result | |
| uint8_t | sfa30_init (sfa30_handle_t *handle) |
| initialize the chip | |
| uint8_t | sfa30_deinit (sfa30_handle_t *handle) |
| close the chip | |
| uint8_t | sfa30_set_get_reg_uart (sfa30_handle_t *handle, uint8_t *input, uint16_t in_len, uint8_t *output, uint16_t out_len) |
| set and get the chip register with uart interface | |
| uint8_t | sfa30_set_reg_iic (sfa30_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len) |
| set the chip register with iic interface | |
| uint8_t | sfa30_get_reg_iic (sfa30_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len) |
| get the chip register with iic interface | |
| uint8_t | sfa30_info (sfa30_info_t *info) |
| get chip information | |
driver sfa30 source file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2023/07/30 | 1.0 | Shifeng Li | first upload |
Definition in file driver_sfa30.c.
| #define CHIP_NAME "Sensirion SFA30" |
| #define DRIVER_VERSION 1000 |
driver version
Definition at line 49 of file driver_sfa30.c.
| #define MANUFACTURER_NAME "Sensirion" |
manufacturer name
Definition at line 43 of file driver_sfa30.c.
| #define MAX_CURRENT 5.0f |
chip max current
Definition at line 46 of file driver_sfa30.c.
| #define SFA30_ADDRESS (0x5D << 1) |
| #define SFA30_IIC_COMMAND_READ_DEVICE_INFORMATION 0xD060U |
read product type command
Definition at line 62 of file driver_sfa30.c.
| #define SFA30_IIC_COMMAND_READ_MEASURED_VALUES 0x0327U |
read measured values command
Definition at line 61 of file driver_sfa30.c.
| #define SFA30_IIC_COMMAND_RESET 0xD304U |
reset command
Definition at line 63 of file driver_sfa30.c.
| #define SFA30_IIC_COMMAND_START_MEASUREMENT 0x0006U |
| #define SFA30_IIC_COMMAND_STOP_MEASUREMENT 0x0104U |
stop measurement command
Definition at line 60 of file driver_sfa30.c.
| #define SFA30_UART_COMMAND_READ_DEVICE_INFORMATION 0xD0 |
read product type command
Definition at line 67 of file driver_sfa30.c.
| #define SFA30_UART_COMMAND_READ_MEASURED_VALUES 0x03 |
read measured values command
Definition at line 66 of file driver_sfa30.c.
| #define SFA30_UART_COMMAND_RESET 0xD3 |
reset command
Definition at line 68 of file driver_sfa30.c.
| #define SFA30_UART_COMMAND_START_MEASUREMENT 0x00 |
start measurement command
Definition at line 64 of file driver_sfa30.c.
| #define SFA30_UART_COMMAND_STOP_MEASUREMENT 0x01 |
stop measurement command
Definition at line 65 of file driver_sfa30.c.
| #define SUPPLY_VOLTAGE_MAX 5.50f |
chip max supply voltage
Definition at line 45 of file driver_sfa30.c.
| #define SUPPLY_VOLTAGE_MIN 3.15f |
chip min supply voltage
Definition at line 44 of file driver_sfa30.c.
| #define TEMPERATURE_MAX 40.0f |
chip max operating temperature
Definition at line 48 of file driver_sfa30.c.
| #define TEMPERATURE_MIN 0.0f |
chip min operating temperature
Definition at line 47 of file driver_sfa30.c.