![]() |
RA Flexible Software Package Documentation
Release v6.0.0
|
|
Functions | |
fsp_err_t | RM_FS3000_Open (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_cfg_t const *const p_cfg) |
Opens and configures the FS3000 Middle module. Implements rm_fsxxxx_api_t::open. More... | |
fsp_err_t | RM_FS3000_Close (rm_fsxxxx_ctrl_t *const p_api_ctrl) |
Disables specified FS3000 control block. Implements rm_fsxxxx_api_t::close. More... | |
fsp_err_t | RM_FS3000_Read (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_raw_data_t *const p_raw_data) |
Reads ADC data from FS3000. Implements rm_fsxxxx_api_t::read. More... | |
fsp_err_t | RM_FS3000_DataCalculate (rm_fsxxxx_ctrl_t *const p_api_ctrl, rm_fsxxxx_raw_data_t *const p_raw_data, rm_fsxxxx_data_t *const p_fs3000_data) |
Calculates flow [m/sec] from ADC data. Implements rm_fsxxxx_api_t::dataCalculate. More... | |
Middleware to implement the FS3000 sensor interface. This module implements the FSXXXX Middleware Interface.
FS3000 is EOL.
The FS3000 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 | FS3000-1005 | FS3000-1005 | Select FS3000 device used. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_fs3000_sensor0 | Module name. |
Callback | Name must be a valid C symbol | fs3000_callback | A user callback function can be provided. |
This module use SDA and SCL pins of I2C Master and SCI I2C.
FS3000 datasheet is here.
If ADC data is invalid, it is needed to read ADC data from FS3000 again. The module only supports FS3000-1005.
If an RTOS is used, blocking and bus lock is available.
The FS3000 interface expects a bus instance to be opened before opening any FS3000 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 FS3000 sensor implementation in an application.
Data Structures | |
struct | rm_fs3000_instance_ctrl_t |
struct rm_fs3000_instance_ctrl_t |
FS3000 Control Block
Data Fields | |
uint32_t | open |
Open flag. | |
rm_fsxxxx_cfg_t const * | p_cfg |
Pointer to FS3000 Configuration. | |
rm_comms_instance_t const * | p_comms_i2c_instance |
Pointer of I2C Communications Middleware instance structure. | |
void * | p_context |
Pointer to the user-provided context. | |
fsp_err_t RM_FS3000_Open | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_cfg_t const *const | p_cfg | ||
) |
Opens and configures the FS3000 Middle module. Implements rm_fsxxxx_api_t::open.
Example:
FSP_SUCCESS | FS3000 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_FS3000_Close | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl | ) |
Disables specified FS3000 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_FS3000_Read | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_raw_data_t *const | p_raw_data | ||
) |
Reads ADC data from FS3000. 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_FS3000_DataCalculate | ( | rm_fsxxxx_ctrl_t *const | p_api_ctrl, |
rm_fsxxxx_raw_data_t *const | p_raw_data, | ||
rm_fsxxxx_data_t *const | p_fs3000_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. |