vavpress 2.0.0.0
VAV Press Click Driver

API for configuring and manipulating VAV Press Click driver. More...

Topics

 VAV Press Registers Settings
 Settings for registers of VAV Press Click driver.
 
 VAV Press MikroBUS Map
 MikroBUS pin mapping of VAV Press Click driver.
 

Functions

void vavpress_cfg_setup (vavpress_cfg_t *cfg)
 VAV Press configuration object setup function.
 
err_t vavpress_init (vavpress_t *ctx, vavpress_cfg_t *cfg)
 VAV Press initialization function.
 
err_t vavpress_default_cfg (vavpress_t *ctx)
 VAV Press default configuration function.
 
err_t vavpress_set_command (vavpress_t *ctx, uint8_t cmd)
 VAV Press set command function.
 
err_t vavpress_generic_write (vavpress_t *ctx, uint8_t *tx_buf, uint8_t tx_len)
 VAV Press I2C writing function.
 
err_t vavpress_generic_read (vavpress_t *ctx, uint8_t *rx_buf, uint8_t rx_len)
 VAV Press I2C reading function.
 
err_t vavpress_set_default_sensor_param (vavpress_t *ctx, vavpress_sensor_param_data_t *param_data)
 VAV Press set default sensor parameter function.
 
err_t vavpress_get_readout_data (vavpress_t *ctx, int16_t *press_data, int16_t *temp_data)
 VAV Press get data readout function.
 
err_t vavpress_get_dif_press_and_temp (vavpress_t *ctx, vavpress_sensor_param_data_t *param_data, float *diff_press, float *temperature)
 VAV Press get differential pressure and temperature function.
 
err_t vavpress_retrieve_electronic_signature (vavpress_t *ctx, vavpress_el_signature_data_t *el_signature_data)
 VAV Press retrieve electronic signature function.
 

Detailed Description

API for configuring and manipulating VAV Press Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ vavpress_cfg_setup()

void vavpress_cfg_setup ( vavpress_cfg_t * cfg)

VAV Press configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See vavpress_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ vavpress_default_cfg()

err_t vavpress_default_cfg ( vavpress_t * ctx)

VAV Press default configuration function.

This function executes a default configuration of VAV Press click board.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ vavpress_generic_read()

err_t vavpress_generic_read ( vavpress_t * ctx,
uint8_t * rx_buf,
uint8_t rx_len )

VAV Press I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_generic_write()

err_t vavpress_generic_write ( vavpress_t * ctx,
uint8_t * tx_buf,
uint8_t tx_len )

VAV Press I2C writing function.

This function writes a desired number of data bytes by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_get_dif_press_and_temp()

err_t vavpress_get_dif_press_and_temp ( vavpress_t * ctx,
vavpress_sensor_param_data_t * param_data,
float * diff_press,
float * temperature )

VAV Press get differential pressure and temperature function.

This function get differential pressure [ Pa ] and temperature [ degree Celsius ] data of the LMIS025BB3, digital low differential pressure sensors on the Vav Press click board™.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[in]param_data: Pointer to the memory location of the structure where data be stored.
[out]diff_press: Pressure [ Pa ].
[out]temperature: Temperature [ degree Celsius ].
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_get_readout_data()

err_t vavpress_get_readout_data ( vavpress_t * ctx,
int16_t * press_data,
int16_t * temp_data )

VAV Press get data readout function.

This function get differential pressure and temperature data of the LMIS025BB3, digital low differential pressure sensors on the Vav Press click board™.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[out]press_data: Pressure signed 15-bit value.
[out]temp_data: Temperature signed 16-bit value.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_init()

err_t vavpress_init ( vavpress_t * ctx,
vavpress_cfg_t * cfg )

VAV Press initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See vavpress_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_retrieve_electronic_signature()

err_t vavpress_retrieve_electronic_signature ( vavpress_t * ctx,
vavpress_el_signature_data_t * el_signature_data )

VAV Press retrieve electronic signature function.

This function retrieve the electronic signature data of the LMIS025BB3, digital low differential pressure sensors on the Vav Press click board™.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[out]vavpress_el_signature_data_t: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_set_command()

err_t vavpress_set_command ( vavpress_t * ctx,
uint8_t cmd )

VAV Press set command function.

This function set a desire command by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[in]cmd:
  • 0x11 - Reset firmware ( W ),
  • 0x21 - Start pressure conversion ( W/R ).
  • 0x23 - Retrieve electronic signature ( W/R ).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ vavpress_set_default_sensor_param()

err_t vavpress_set_default_sensor_param ( vavpress_t * ctx,
vavpress_sensor_param_data_t * param_data )

VAV Press set default sensor parameter function.

This function set default sensor parameter data of the LMIS025BB3, digital low differential pressure sensors on the Vav Press click board™.

Parameters
[in]ctx: Click context object. See vavpress_t object definition for detailed explanation.
[in]vavpress_sensor_param_data_t: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.