barometer7 2.0.0.0
Barometer 7 Click Driver

API for configuring and manipulating Barometer 7 Click driver. More...

Topics

 Barometer 7 Registers List
 List of registers of Barometer 7 Click driver.
 
 Barometer 7 Registers Settings
 Settings for registers of Barometer 7 Click driver.
 
 Barometer 7 MikroBUS Map
 MikroBUS pin mapping of Barometer 7 Click driver.
 

Functions

void barometer7_cfg_setup (barometer7_cfg_t *cfg)
 Barometer 7 configuration object setup function.
 
err_t barometer7_init (barometer7_t *ctx, barometer7_cfg_t *cfg)
 Barometer 7 initialization function.
 
err_t barometer7_default_cfg (barometer7_t *ctx)
 Barometer 7 default configuration function.
 
err_t barometer7_generic_transfer (barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
 Barometer 7 data transfer function.
 
err_t barometer7_set_command (barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
 Barometer 7 set command function.
 
err_t barometer7_set_reset (barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
 Barometer 7 set reset function.
 
err_t barometer7_get_press_data (barometer7_t *ctx, uint16_t *press_data)
 Barometer 7 get pressure data function.
 
err_t barometer7_get_temp_data (barometer7_t *ctx, uint16_t *temp_data)
 Barometer 7 get temperature data function.
 
err_t barometer7_get_trigger_diagnosis_data (barometer7_t *ctx, uint16_t *td_data)
 Barometer 7 get trigger diagnosis data function.
 
err_t barometer7_trigger_test_mode (barometer7_t *ctx, uint16_t *tdm_data)
 Barometer 7 get trigger test mode data function.
 
err_t barometer7_get_id_data (barometer7_t *ctx, uint16_t *id_data)
 Barometer 7 get ID data function.
 
err_t barometer7_get_identifier (barometer7_t *ctx, barometer7_identifier_t *identifier)
 Barometer 7 get identifier function.
 
err_t barometer7_get_pressure (barometer7_t *ctx, float *pressure)
 Barometer 7 get pressure function.
 
err_t barometer7_get_temperature (barometer7_t *ctx, float *temperature)
 Barometer 7 get temperature function.
 

Detailed Description

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

◆ barometer7_cfg_setup()

void barometer7_cfg_setup ( barometer7_cfg_t * cfg)

Barometer 7 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ barometer7_default_cfg()

err_t barometer7_default_cfg ( barometer7_t * ctx)

Barometer 7 default configuration function.

This function executes a default configuration of Barometer 7 click board.

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

◆ barometer7_generic_transfer()

err_t barometer7_generic_transfer ( barometer7_t * ctx,
uint8_t cmd,
uint16_t * data_out )

Barometer 7 data transfer function.

This function writes a desired command and read response data from the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[in]cmd: Desired command.
[out]data_out: Output read 10-bit data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_id_data()

err_t barometer7_get_id_data ( barometer7_t * ctx,
uint16_t * id_data )

Barometer 7 get ID data function.

This function read the identifier data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]id_data: Output read identifier data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_identifier()

err_t barometer7_get_identifier ( barometer7_t * ctx,
barometer7_identifier_t * identifier )

Barometer 7 get identifier function.

This function read the identifier data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]identifier: Pointer to the response structure for identifier.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_press_data()

err_t barometer7_get_press_data ( barometer7_t * ctx,
uint16_t * press_data )

Barometer 7 get pressure data function.

This function read the 10-bit pressure data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]press_data: Output read 10-bit pressure data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_pressure()

err_t barometer7_get_pressure ( barometer7_t * ctx,
float * pressure )

Barometer 7 get pressure function.

This function read the pressure data and calculate pressure ( mbar ) of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]pressure: Pressure data ( mbar ).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_temp_data()

err_t barometer7_get_temp_data ( barometer7_t * ctx,
uint16_t * temp_data )

Barometer 7 get temperature data function.

This function read the 10-bit temperature data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]temp_data: Output read 10-bit temperature data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_temperature()

err_t barometer7_get_temperature ( barometer7_t * ctx,
float * temperature )

Barometer 7 get temperature function.

This function read the temperature data and calculate temperature ( degree Celsius ) of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]temperature: Temperature data ( degree Celsius ).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_get_trigger_diagnosis_data()

err_t barometer7_get_trigger_diagnosis_data ( barometer7_t * ctx,
uint16_t * td_data )

Barometer 7 get trigger diagnosis data function.

This function read the trigger diagnosis data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]td_data: Output read trigger diagnosis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_init()

err_t barometer7_init ( barometer7_t * ctx,
barometer7_cfg_t * cfg )

Barometer 7 initialization function.

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

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

◆ barometer7_set_command()

err_t barometer7_set_command ( barometer7_t * ctx,
uint8_t cmd,
uint16_t * data_out )

Barometer 7 set command function.

This function writes a desired command and read response to the previous command from the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[in]cmd: Desired command.
[out]data_out: Output read 10-bit data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ barometer7_set_reset()

err_t barometer7_set_reset ( barometer7_t * ctx,
uint8_t cmd,
uint16_t * data_out )

Barometer 7 set reset function.

This function set reset, determines how the diagnostic reset is handled of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[in]cmd: Desired command.
[out]data_out: Output read 10-bit data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
A detected failure is only transmitted by the responding diagnosis code as long as the failure is present. The diagnosis code will be reset after once transmitted. Only if the failure is detected again, the diagnosis code will be transmitted again with the next response.

◆ barometer7_trigger_test_mode()

err_t barometer7_trigger_test_mode ( barometer7_t * ctx,
uint16_t * tdm_data )

Barometer 7 get trigger test mode data function.

This function read the trigger test mode data of the KP264, Digital Absolute Pressure Sensor on the Barometer 7 Click board™.

Parameters
[in]ctx: Click context object. See barometer7_t object definition for detailed explanation.
[out]tdm_data: Output read trigger test mode data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.