![]() |
RA Flexible Software Package Documentation
Release v5.8.0
|
|
Functions | |
fsp_err_t | RM_FS1015_Open (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_cfg_t const *const p_cfg) |
Opens and configures the FS1015 Middle module. Implements rm_fsxxxx_api_t::open. More... | |
fsp_err_t | RM_FS1015_Close (rm_fsxxxx_ctrl_t *const p_api_ctrl) |
Disables specified FS1015 control block. Implements rm_fsxxxx_api_t::close. More... | |
fsp_err_t | RM_FS1015_Read (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_raw_data_t *const p_raw_data) |
Reads ADC data from FS1015. Implements rm_fsxxxx_api_t::read. More... | |
fsp_err_t | RM_FS1015_DataCalculate (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_raw_data_t *const p_raw_data, rm_fsxxxx_data_t *const p_fs1015_data) |
Calculates flow [m/sec] from ADC data. Implements rm_fsxxxx_api_t::dataCalculate. More... | |
Middleware to implement the FS1015 sensor interface. This module implements the FSXXXX Middleware Interface.
FS1015 is EOL.
The FS1015 sensor interface implementation has the following key features:
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Device Type | FS1015-1005 | FS1015-1005 | Select FS1015 device used. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_fs1015_sensor0 | Module name. |
Callback | Name must be a valid C symbol | fs1015_callback | A user callback function can be provided. |
This module use SDA and SCL pins of I2C Master and SCI I2C.
FS1015 datasheet is here.
If ADC data is invalid, it is needed to read ADC data from FS1015 again. The module only supports FS1015-1005.
If an RTOS is used, blocking and bus lock is available.
The FS1015 interface expects a bus instance to be opened before opening any FS1015 device. The interface will handle switching between devices on the bus but will not open or close the bus instance. The user should open the bus with the appropriate I2C Master Interface open call.
This is a basic example of minimal use of FS1015 sensor implementation in an application.
Data Structures | |
struct | rm_fs1015_instance_ctrl_t |
struct rm_fs1015_instance_ctrl_t |
FS1015 Control Block
Data Fields | |
uint32_t | open |
Open flag. | |
rm_fsxxxx_cfg_t const * | p_cfg |
Pointer to FS1015 Configuration. | |
rm_comms_instance_t const * | p_comms_i2c_instance |
Pointer of I2C Communications Middleware instance structure. | |
void const * | p_context |
Pointer to the user-provided context. | |
fsp_err_t RM_FS1015_Open | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_cfg_t const *const | p_cfg | ||
) |
Opens and configures the FS1015 Middle module. Implements rm_fsxxxx_api_t::open.
Example:
FSP_SUCCESS | FS1015 successfully configured. |
FSP_ERR_ASSERTION | Null pointer, or one or more configuration options is invalid. |
FSP_ERR_ALREADY_OPEN | Module is already open. This module can only be opened once. |
fsp_err_t RM_FS1015_Close | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl | ) |
Disables specified FS1015 control block. Implements rm_fsxxxx_api_t::close.
FSP_SUCCESS | Successfully closed. |
FSP_ERR_ASSERTION | Null pointer passed as a parameter. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_FS1015_Read | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_raw_data_t *const | p_raw_data | ||
) |
Reads ADC data from FS1015. Implements rm_fsxxxx_api_t::read.
FSP_SUCCESS | Successfully data decoded. |
FSP_ERR_ASSERTION | Null pointer, or one or more configuration options is invalid. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_FS1015_DataCalculate | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_raw_data_t *const | p_raw_data, | ||
rm_fsxxxx_data_t *const | p_fs1015_data | ||
) |
Calculates flow [m/sec] from ADC data. Implements rm_fsxxxx_api_t::dataCalculate.
FSP_SUCCESS | Successfully data decoded. |
FSP_ERR_ASSERTION | Null pointer, or one or more configuration options is invalid. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_SENSOR_INVALID_DATA | Data is invalid. |