pressure15 2.0.0.0
Pressure 15 Click Driver

API for configuring and manipulating Pressure 15 Click driver. More...

Topics

 Pressure 15 Registers List
 List of registers of Pressure 15 Click driver.
 
 Pressure 15 Registers Settings
 Settings for registers of Pressure 15 Click driver.
 
 Pressure 15 MikroBUS Map
 MikroBUS pin mapping of Pressure 15 Click driver.
 

Functions

void pressure15_cfg_setup (pressure15_cfg_t *cfg)
 Pressure 15 configuration object setup function.
 
void pressure15_drv_interface_selection (pressure15_cfg_t *cfg, pressure15_drv_t drv_sel)
 Pressure 15 driver interface setup function.
 
err_t pressure15_init (pressure15_t *ctx, pressure15_cfg_t *cfg)
 Pressure 15 initialization function.
 
err_t pressure15_default_cfg (pressure15_t *ctx)
 Pressure 15 default configuration function.
 
err_t pressure15_generic_write (pressure15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Pressure 15 data writing function.
 
err_t pressure15_generic_read (pressure15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Pressure 15 data reading function.
 
uint8_t pressure15_get_int (pressure15_t *ctx)
 Get interrupt pin state.
 
err_t pressure15_get_temperature (pressure15_t *ctx, float *temperature)
 Get temperature data.
 
err_t pressure15_get_pressure (pressure15_t *ctx, float *pressure)
 Get pressure data.
 

Detailed Description

API for configuring and manipulating Pressure 15 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

◆ pressure15_cfg_setup()

void pressure15_cfg_setup ( pressure15_cfg_t * cfg)

Pressure 15 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ pressure15_default_cfg()

err_t pressure15_default_cfg ( pressure15_t * ctx)

Pressure 15 default configuration function.

This function executes a default configuration of Pressure 15 click board.

Parameters
[in]ctx: Click context object. See pressure15_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.

◆ pressure15_drv_interface_selection()

void pressure15_drv_interface_selection ( pressure15_cfg_t * cfg,
pressure15_drv_t drv_sel )

Pressure 15 driver interface setup function.

This function sets a serial driver interface which will be used further in the click driver.

Parameters
[out]cfg: Click configuration structure. See pressure15_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See pressure15_drv_t object definition for detailed explanation.
Returns
Nothing.
Note
This driver selection should be call before init function to configure the driver to work with the serial interface which is consistent with the real state of the hardware. If this function is not called, the default driver interface will be set.

◆ pressure15_generic_read()

err_t pressure15_generic_read ( pressure15_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Pressure 15 data reading function.

This function reads a desired number of data bytes starting from the selected register.

Parameters
[in]ctx: Click context object. See pressure15_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ pressure15_generic_write()

err_t pressure15_generic_write ( pressure15_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Pressure 15 data writing function.

This function writes a desired number of data bytes starting from the selected register.

Parameters
[in]ctx: Click context object. See pressure15_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ pressure15_get_int()

uint8_t pressure15_get_int ( pressure15_t * ctx)

Get interrupt pin state.

Read state of interrupt pin.

Parameters
[in]ctx: Click context object. See pressure15_t object definition for detailed explanation.
Returns
Interrupt pin state.

◆ pressure15_get_pressure()

err_t pressure15_get_pressure ( pressure15_t * ctx,
float * pressure )

Get pressure data.

Read and calculate pressure data from device

Parameters
[in]ctx: Click context object. See pressure15_t object definition for detailed explanation.
[out]pressure: Pressure data in hPa unit.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ pressure15_get_temperature()

err_t pressure15_get_temperature ( pressure15_t * ctx,
float * temperature )

Get temperature data.

Read and calculate temperature data from device.

Parameters
[in]ctx: Click context object. See pressure15_t object definition for detailed explanation.
[out]temperature: Temperature data in degC unit.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ pressure15_init()

err_t pressure15_init ( pressure15_t * ctx,
pressure15_cfg_t * cfg )

Pressure 15 initialization function.

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

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