barometer2 2.0.0.0

Functions

void barometer2_cfg_setup (barometer2_cfg_t *cfg)
 Config Object Initialization function.
 
BAROMETER2_RETVAL barometer2_init (barometer2_t *ctx, barometer2_cfg_t *cfg)
 Initialization function.
 
void barometer2_default_cfg (barometer2_t *ctx)
 Click Default Configuration function.
 
void barometer2_generic_write (barometer2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void barometer2_generic_read (barometer2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void barometer2_write_byte (barometer2_t *ctx, uint8_t reg, uint8_t data_bytes)
 Write one byte function.
 
uint8_t barometer2_read_byte (barometer2_t *ctx, uint8_t reg)
 Read one byte function.
 
float barometer2_get_temperature (barometer2_t *ctx, uint8_t temp_format)
 Read temperature function.
 
void barometer2_software_reset (barometer2_t *ctx)
 Reset function.
 
float barometer2_get_pressure (barometer2_t *ctx, uint8_t press_format)
 Read pressure function.
 
uint8_t barometer2_get_interrupt (barometer2_t *ctx)
 Gets interrupt.
 

Detailed Description

Function Documentation

◆ barometer2_cfg_setup()

void barometer2_cfg_setup ( barometer2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ barometer2_default_cfg()

void barometer2_default_cfg ( barometer2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Barometer2 click.

◆ barometer2_generic_read()

void barometer2_generic_read ( barometer2_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ barometer2_generic_write()

void barometer2_generic_write ( barometer2_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ barometer2_get_interrupt()

uint8_t barometer2_get_interrupt ( barometer2_t * ctx)

Gets interrupt.

Parameters
ctxClick object.

@description This function gets the interrupt.

◆ barometer2_get_pressure()

float barometer2_get_pressure ( barometer2_t * ctx,
uint8_t press_format )

Read pressure function.

Parameters
ctxClick object.
temp_formatUnit of measurement.

@description This function reads pressure data and stores it in different formats depending on the unit of measurement parameter.

◆ barometer2_get_temperature()

float barometer2_get_temperature ( barometer2_t * ctx,
uint8_t temp_format )

Read temperature function.

Parameters
ctxClick object.
temp_formatUnit of measurement.

@description This function reads temperature data and stores it in different formats depending on the unit of measurement parameter.

◆ barometer2_init()

BAROMETER2_RETVAL barometer2_init ( barometer2_t * ctx,
barometer2_cfg_t * cfg )

Initialization function.

Parameters
barometer2Click object.
cfgClick configuration structure.

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

◆ barometer2_read_byte()

uint8_t barometer2_read_byte ( barometer2_t * ctx,
uint8_t reg )

Read one byte function.

Parameters
ctxClick object.
regRegister address.

@description This function reads one byte of data from the desired register.

◆ barometer2_software_reset()

void barometer2_software_reset ( barometer2_t * ctx)

Reset function.

Parameters
ctxClick object.

@description This function resets the device to its default settings.

◆ barometer2_write_byte()

void barometer2_write_byte ( barometer2_t * ctx,
uint8_t reg,
uint8_t data_bytes )

Write one byte function.

Parameters
ctxClick object.
regRegister address.
data_bytesData to be written.

@description This function writes one byte of data to the desired register.