barometer10 2.1.0.0
barometer10.h File Reference

This file contains API for Barometer 10 Click Driver. More...

#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  barometer10_t
 Barometer 10 Click context object. More...
 
struct  barometer10_cfg_t
 Barometer 10 Click configuration object. More...
 
struct  barometer10_sensor_cfg_t
 Barometer 10 Click sensor configuration object. More...
 

Macros

#define BAROMETER10_REG_INTERRUPT_CFG   0x0B
 Barometer 10 description register.
 
#define BAROMETER10_REG_THS_P_L   0x0C
 
#define BAROMETER10_REG_THS_P_H   0x0D
 
#define BAROMETER10_REG_IF_CTRL   0x0E
 
#define BAROMETER10_REG_WHO_AM_I   0x0F
 
#define BAROMETER10_REG_CTRL_REG1   0x10
 
#define BAROMETER10_REG_CTRL_REG2   0x11
 
#define BAROMETER10_REG_CTRL_REG3   0x12
 
#define BAROMETER10_REG_CTRL_REG4   0x13
 
#define BAROMETER10_REG_FIFO_CTRL   0x14
 
#define BAROMETER10_REG_FIFO_WTM   0x15
 
#define BAROMETER10_REG_REF_P_L   0x16
 
#define BAROMETER10_REG_REF_P_H   0x17
 
#define BAROMETER10_REG_I3C_IF_CTRL_ADD   0x19
 
#define BAROMETER10_REG_RPDS_L   0x1A
 
#define BAROMETER10_REG_RPDS_H   0x1B
 
#define BAROMETER10_REG_INT_SOURCE   0x24
 
#define BAROMETER10_REG_FIFO_STATUS1   0x25
 
#define BAROMETER10_REG_FIFO_STATUS2   0x26
 
#define BAROMETER10_REG_STATUS   0x27
 
#define BAROMETER10_REG_PRESS_OUT_XL   0x28
 
#define BAROMETER10_REG_PRESS_OUT_L   0x29
 
#define BAROMETER10_REG_PRESS_OUT_H   0x2A
 
#define BAROMETER10_REG_TEMP_OUT_L   0x2B
 
#define BAROMETER10_REG_TEMP_OUT_H   0x2C
 
#define BAROMETER10_REG_FIFO_DATA_OUT_PRESS_XL   0x78
 
#define BAROMETER10_REG_FIFO_DATA_OUT_PRESS_L   0x79
 
#define BAROMETER10_REG_FIFO_DATA_OUT_PRESS_H   0x7A
 
#define BAROMETER10_DEVICE_ID   0xB4
 Barometer 10 description BAROMETER10_REG_WHO_AM_I register value.
 
#define BAROMETER10_ODR_ONE_SHOT   0x00
 Barometer 10 description BAROMETER10_REG_CTRL_REG1 register value.
 
#define BAROMETER10_ODR_1_Hz   0x01
 
#define BAROMETER10_ODR_4_Hz   0x02
 
#define BAROMETER10_ODR_10_Hz   0x03
 
#define BAROMETER10_ODR_25_Hz   0x04
 
#define BAROMETER10_ODR_50_Hz   0x05
 
#define BAROMETER10_ODR_75_Hz   0x06
 
#define BAROMETER10_ODR_100_Hz   0x07
 
#define BAROMETER10_ODR_200_Hz   0x08
 
#define BAROMETER10_AVG_4   0x00
 
#define BAROMETER10_AVG_8   0x01
 
#define BAROMETER10_AVG_16   0x02
 
#define BAROMETER10_AVG_32   0x03
 
#define BAROMETER10_AVG_64   0x04
 
#define BAROMETER10_AVG_128   0x05
 
#define BAROMETER10_AVG_512   0x07
 
#define BAROMETER10_FS_MODE_1260_hPa   0x00
 Barometer 10 description BAROMETER10_REG_CTRL_REG2 register value.
 
#define BAROMETER10_FS_MODE_4060_hPa   0x01
 
#define BAROMETER10_LFPF_CFG_ODR4   0x00
 
#define BAROMETER10_LFPF_CFG_ODR9   0x01
 
#define BAROMETER10_EN_LPFP_DISABLE   0x00
 
#define BAROMETER10_EN_LPFP_ENABLE   0x01
 
#define BAROMETER10_BDU_CONTINUOUS_UPDATE   0x00
 
#define BAROMETER10_BDU_NO_UPDATE_UNTIL_READ   0x01
 
#define BAROMETER10_SWRESET_BIT_MASK   0x02
 
#define BAROMETER10_ONESHOT_IDLE_MODE   0x00
 
#define BAROMETER10_ONESHOT_NEW_SET_ACQUIRED   0x01
 
#define BAROMETER10_INT_H_L_ACTIVE_HIGH   0x00
 Barometer 10 description BAROMETER10_REG_CTRL_REG3 register value.
 
#define BAROMETER10_INT_H_L_ACTIVE_LOW   0x01
 
#define BAROMETER10_IF_ADD_INC_DISABLE   0x00
 
#define BAROMETER10_IF_ADD_INC_ENABLE   0x01
 
#define BAROMETER10_DRDY_PLS_DISABLE   0x00
 Barometer 10 description BAROMETER10_REG_CTRL_REG4 register value.
 
#define BAROMETER10_DRDY_PLS_ENABLE   0x01
 
#define BAROMETER10_DRDY_DISABLE   0x00
 
#define BAROMETER10_DRDY_ENABLE   0x01
 
#define BAROMETER10_INT_EN_DISABLE   0x00
 
#define BAROMETER10_INT_EN_ENABLE   0x01
 
#define BAROMETER10_DEVICE_ADDRESS_GND   0x5C
 Barometer 10 device address setting.
 
#define BAROMETER10_DEVICE_ADDRESS_VCC   0x5D
 
#define BAROMETER10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  barometer10_return_value_t { BAROMETER10_OK = 0 , BAROMETER10_ERROR = -1 }
 Barometer 10 Click return value data. More...
 

Functions

void barometer10_cfg_setup (barometer10_cfg_t *cfg)
 Barometer 10 configuration object setup function.
 
err_t barometer10_init (barometer10_t *ctx, barometer10_cfg_t *cfg)
 Barometer 10 initialization function.
 
err_t barometer10_default_cfg (barometer10_t *ctx)
 Barometer 10 default configuration function.
 
err_t barometer10_generic_write (barometer10_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Barometer 10 I2C writing function.
 
err_t barometer10_generic_read (barometer10_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Barometer 10 I2C reading function.
 
err_t barometer10_sw_reset (barometer10_t *ctx)
 Barometer 10 software reset function.
 
err_t barometer10_get_device_id (barometer10_t *ctx, uint8_t *device_id)
 Barometer 10 gets device ID function.
 
err_t barometer10_get_config (barometer10_t *ctx, barometer10_sensor_cfg_t *config)
 Barometer 10 gets configuration function.
 
err_t barometer10_set_config (barometer10_t *ctx, barometer10_sensor_cfg_t config)
 Barometer 10 set configuration function.
 
err_t barometer10_trigger_one_shot (barometer10_t *ctx)
 Barometer 10 trigger one-shot function.
 
err_t barometer10_get_pressure_output (barometer10_t *ctx, int32_t *pressure_raw)
 Barometer 10 gets pressure output function.
 
err_t barometer10_get_temperature_output (barometer10_t *ctx, int16_t *temperature_raw)
 Barometer 10 gets temperature output function.
 
err_t barometer10_get_pressure (barometer10_t *ctx, float *pressure)
 Barometer 10 gets pressure function.
 
err_t barometer10_get_temperature (barometer10_t *ctx, float *temperature)
 Barometer 10 gets temperature function.
 
uint8_t barometer10_get_int_pin (barometer10_t *ctx)
 Barometer 10 gets interrupt function.
 

Detailed Description

This file contains API for Barometer 10 Click Driver.

Enumeration Type Documentation

◆ barometer10_return_value_t

Barometer 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
BAROMETER10_OK 
BAROMETER10_ERROR