airvelocity 2.1.0.0
Air Velocity Click Driver

API for configuring and manipulating Air Velocity Click driver. More...

Topics

 Air Velocity Registers Settings
 Settings for registers of Air Velocity Click driver.
 
 Air Velocity MikroBUS Map
 MikroBUS pin mapping of Air Velocity Click driver.
 

Functions

void airvelocity_cfg_setup (airvelocity_cfg_t *cfg)
 Air Velocity configuration object setup function.
 
err_t airvelocity_init (airvelocity_t *ctx, airvelocity_cfg_t *cfg)
 Air Velocity initialization function.
 
err_t airvelocity_read_output (airvelocity_t *ctx, uint16_t *out_counts)
 Air Velocity read output function.
 
float airvelocity_convert_counts_to_mps (uint16_t out_counts)
 Air Velocity convert counts to mps function.
 

Detailed Description

API for configuring and manipulating Air Velocity 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

◆ airvelocity_cfg_setup()

void airvelocity_cfg_setup ( airvelocity_cfg_t * cfg)

Air Velocity configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ airvelocity_convert_counts_to_mps()

float airvelocity_convert_counts_to_mps ( uint16_t out_counts)

Air Velocity convert counts to mps function.

This function converts raw output counts to velocity in m/sec (0-7.23).

Parameters
[in]out_counts: Output counts raw data.
Returns
Float value of velocity in m/sec (0-7.23).
Note
None.

◆ airvelocity_init()

err_t airvelocity_init ( airvelocity_t * ctx,
airvelocity_cfg_t * cfg )

Air Velocity initialization function.

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

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

◆ airvelocity_read_output()

err_t airvelocity_read_output ( airvelocity_t * ctx,
uint16_t * out_counts )

Air Velocity read output function.

This function reads the raw output counts by using I2C serial interface.

Parameters
[in]ctx: Click context object. See airvelocity_t object definition for detailed explanation.
[out]out_counts: Output counts raw data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.