pressure10 2.0.0.0

Functions

void pressure10_cfg_setup (pressure10_cfg_t *cfg)
 Config Object Initialization function.
 
PRESSURE10_RETVAL pressure10_init (pressure10_t *ctx, pressure10_cfg_t *cfg)
 Initialization function.
 
void pressure10_default_cfg (pressure10_t *ctx)
 Click Default Configuration function.
 
void pressure10_generic_write (pressure10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void pressure10_generic_read (pressure10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure10_send_cmd (pressure10_t *ctx, uint8_t cmd)
 Send command.
 
uint8_t pressure10_check_communication (pressure10_t *ctx)
 Check communication.
 
void pressure10_get_status (pressure10_t *ctx, pressure10_status_t *status_obj)
 Get status function.
 
float pressure10_get_temperature (pressure10_t *ctx)
 Get Temperature data in C.
 
float pressure10_get_pressure (pressure10_t *ctx)
 Get Pressure data in mBar.
 
void pressure10_control_cfg (pressure10_t *ctx, uint8_t ctrl_reg, uint8_t wr_data)
 Set the configuration in the control registers.
 
uint8_t pressure10_get_drdy_pin (pressure10_t *ctx)
 Get DRDY pin state.
 

Detailed Description

Function Documentation

◆ pressure10_cfg_setup()

void pressure10_cfg_setup ( pressure10_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.

◆ pressure10_check_communication()

uint8_t pressure10_check_communication ( pressure10_t * ctx)

Check communication.

Parameters
ctxClick object.
Returns
if device communication ok return [0], else return [1]

◆ pressure10_control_cfg()

void pressure10_control_cfg ( pressure10_t * ctx,
uint8_t ctrl_reg,
uint8_t wr_data )

Set the configuration in the control registers.

Parameters
ctxClick object.
ctrl_regControl register address
wr_dataConfiguration data

◆ pressure10_default_cfg()

void pressure10_default_cfg ( pressure10_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Pressure 10 click.

◆ pressure10_generic_read()

void pressure10_generic_read ( pressure10_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

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

@description This function reads data from the desired register.

◆ pressure10_generic_write()

void pressure10_generic_write ( pressure10_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

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

@description This function writes data to the desired register.

◆ pressure10_get_drdy_pin()

uint8_t pressure10_get_drdy_pin ( pressure10_t * ctx)

Get DRDY pin state.

Parameters
ctxClick object.
Returns
drdy pin state

◆ pressure10_get_pressure()

float pressure10_get_pressure ( pressure10_t * ctx)

Get Pressure data in mBar.

Parameters
ctxClick object.
Returns
pressure data

◆ pressure10_get_status()

void pressure10_get_status ( pressure10_t * ctx,
pressure10_status_t * status_obj )

Get status function.

Parameters
ctxClick object.
status_objStatus structure to be filled

◆ pressure10_get_temperature()

float pressure10_get_temperature ( pressure10_t * ctx)

Get Temperature data in C.

Parameters
ctxClick object.
Returns
temperature data

◆ pressure10_init()

PRESSURE10_RETVAL pressure10_init ( pressure10_t * ctx,
pressure10_cfg_t * cfg )

Initialization function.

Parameters
pressure10Click object.
cfgClick configuration structure.

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

◆ pressure10_send_cmd()

void pressure10_send_cmd ( pressure10_t * ctx,
uint8_t cmd )

Send command.

Parameters
cmdCommand