FIFO operations of the sensor.
FIFO operations of the sensor.
bmp3_set_fifo_settings
int8_t bmp3_set_fifo_settings(uint16_t desired_settings,
struct bmp3_fifo_settings *fifo_settings,
This API sets the fifo_config_1(fifo_mode,
fifo_stop_on_full, fifo_time_en, fifo_press_en, fifo_temp_en), fifo_config_2(fifo_subsampling, data_select) and int_ctrl(fwtm_en, ffull_en) settings in the sensor.
- Parameters
-
| [in] | desired_settings | : Variable used to select the FIFO settings which are to be set in the sensor. |
- Note
- : Below are the macros to be used by the user for selecting the desired settings. User can do OR operation of these macros for configuring multiple settings.
* --------------------------------|---------------------------------------------
* desired_settings | Functionality
* --------------------------------|---------------------------------------------
* BMP3_SEL_FIFO_MODE | Enable/Disable FIFO
* BMP3_SEL_FIFO_STOP_ON_FULL_EN | Set FIFO stop on full interrupt
* BMP3_SEL_FIFO_TIME_EN | Enable/Disable FIFO time
* BMP3_SEL_FIFO_PRESS_EN | Enable/Disable pressure
* BMP3_SEL_FIFO_TEMP_EN | Enable/Disable temperature
* BMP3_SEL_FIFO_DOWN_SAMPLING | Set FIFO downsampling
* BMP3_SEL_FIFO_FILTER_EN | Enable/Disable FIFO filter
* BMP3_SEL_FIFO_FWTM_EN | Enable/Disable FIFO watermark interrupt
* BMP3_SEL_FIFO_FFULL_EN | Enable/Disable FIFO full interrupt
* --------------------------------|---------------------------------------------
*
- Parameters
-
- Returns
- Result of API execution status
- Return values
-
| 0 | -> Success |
| >0 | -> Warning |
| <0 | -> Error |
bmp3_get_fifo_data
\ingroup bmp3ApiFIFO
\page bmp3_api_bmp3_get_fifo_settings bmp3_get_fifo_settings
\code
// * int8_t bmp3_get_fifo_settings(struct bmp3_fifo_settings *fifo_settings, struct bmp3_dev *dev); // * This API gets the fifo_config_1(fifo_mode,
fifo_stop_on_full, fifo_time_en, fifo_press_en, fifo_temp_en), fifo_config_2(fifo_subsampling, data_select) and int_ctrl(fwtm_en, ffull_en) settings from the sensor.
- Parameters
-
- Returns
- Result of API execution status
- Return values
-
| 0 | -> Success |
| >0 | -> Warning |
| <0 | -> Error / int8_t bmp3_get_fifo_settings(struct bmp3_fifo_settings *fifo_settings, struct bmp3_dev *dev); |
/*!
This API gets the fifo data from the sensor.
- Parameters
-
- Returns
- Result of API execution status.
- Return values
-
| 0 | -> Success |
| >0 | -> Warning |
| <0 | -> Error / int8_t bmp3_get_fifo_data(struct bmp3_fifo_data *fifo,
const struct bmp3_fifo_settings *fifo_settings,
struct bmp3_dev *dev); |
/*!
bmp3_get_fifo_length
This API gets the fifo length from the sensor.
- Parameters
-
| [out] | fifo_length | : Variable used to store the fifo length. |
| [in] | dev | : Structure instance of bmp3_dev. |
- Returns
- Result of API execution status.
- Return values
-
/*!
bmp3_extract_fifo_data
This API extracts the temperature and/or pressure data from the FIFO data which is already read from the fifo.
- Parameters
-
| [out] | data | : Array of bmp3_data structures where the temperature and pressure frames will be stored. |
| [in] | fifo | : Structure instance of bmp3_fifo_data |
| [in] | dev | : Structure instance of bmp3_dev |
- Returns
- Result of API execution status.
- Return values
-
| 0 | -> Success |
| <0 | -> Error / int8_t bmp3_extract_fifo_data(struct bmp3_data *data, struct bmp3_fifo_data *fifo, struct bmp3_dev *dev); |
/*!
bmp3_set_fifo_watermark
This API sets the fifo watermark length according to the frames count set by the user in the device structure. Refer below for usage.
- Note
- : fifo.req_frames = 50;
- Parameters
-
- Returns
- Result of API execution status.
- Return values
-
| 0 | -> Success |
| <0 | -> Error / int8_t bmp3_set_fifo_watermark(const struct bmp3_fifo_data *fifo,
const struct bmp3_fifo_settings *fifo_settings,
struct bmp3_dev *dev); |
/*!
bmp3_get_fifo_watermark
This API gets the fifo watermark length according to the frames count set by the user in the device structure
- Parameters
-
| [in] | watermark_len | : Watermark level value |
| [in] | dev | : Structure instance of bmp3_dev |
- Returns
- Result of API execution status.
- Return values
-
| 0 | -> Success |
| <0 | -> Error / int8_t bmp3_get_fifo_watermark(uint16_t *watermark_len, struct bmp3_dev *dev); |
/*!