I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
BMP180.h File Reference

BMP180 Driver. More...

#include "sarmfsw.h"
#include "I2C_component.h"
#include "I2C_peripheral.h"
#include "BMP180_proc.h"
#include "BMP180_ex.h"
Include dependency graph for BMP180.h:
This graph shows which files directly or indirectly include this file:

Data Structures

union  uBMP180_REG__OUT_MSB
 Union for out_msb of BMP180. More...
 
union  uBMP180_REG__OUT_LSB
 Union for out_lsb of BMP180. More...
 
union  uBMP180_REG__OUT_XLSB
 Union for out_xlsb of BMP180. More...
 
union  uBMP180_REG__MEAS_CTRL
 Union for meas_ctrl of BMP180. More...
 

Macros

#define I2C_BMP180_NB   1U
 Number of BMP180 peripherals.
 
#define BMP180_BASE_ADDR   0x77U
 BMP180 Base address.
 

Enumerations

enum  BMP180_reg {
  BMP180__CALIB_AC1_MSB = 0xAAU , BMP180__CALIB_AC1_LSB , BMP180__CALIB_AC2_MSB , BMP180__CALIB_AC2_LSB ,
  BMP180__CALIB_AC3_MSB , BMP180__CALIB_AC3_LSB , BMP180__CALIB_AC4_MSB , BMP180__CALIB_AC4_LSB ,
  BMP180__CALIB_AC5_MSB , BMP180__CALIB_AC5_LSB , BMP180__CALIB_AC6_MSB , BMP180__CALIB_AC6_LSB ,
  BMP180__CALIB_B1_MSB , BMP180__CALIB_B1_LSB , BMP180__CALIB_B2_MSB , BMP180__CALIB_B2_LSB ,
  BMP180__CALIB_MB_MSB , BMP180__CALIB_MB_LSB , BMP180__CALIB_MC_MSB , BMP180__CALIB_MC_LSB ,
  BMP180__CALIB_MD_MSB , BMP180__CALIB_MD_LSB , BMP180__ID = 0xD0U , BMP180__VERSION ,
  BMP180__SOFT_RESET = 0xE0U , BMP180__CTRL_MEAS = 0xF4U , BMP180__OUT_MSB = 0xF6U , BMP180__OUT_LSB ,
  BMP180__OUT_XLSB
}
 Register map enum of BMP180. More...
 
enum  BMP180_oversampling { BMP180__OSS_1_TIME = 0U , BMP180__OSS_2_TIME , BMP180__OSS_4_TIME , BMP180__OSS_8_TIME }
 Oversampling enum of BMP180. More...
 
enum  BMP180_meas { BMP180__MEAS_TEMPERATURE = 0x0EU , BMP180__MEAS_PRESSURE = 0x14U }
 BMP180 measure types. More...
 

Functions

FctERR BMP180_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for BMP180 peripheral.
 
FctERR BMP180_Init_Single (void)
 Initialization for BMP180 peripheral.
 
FctERR BMP180_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for BMP180.
 
FctERR BMP180_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for BMP180.
 
FctERR BMP180_Read_Word (I2C_slave_t *const pSlave, uint16_t *data, const uint16_t addr)
 I2C Word Read function for BMP180.
 

Detailed Description

BMP180 Driver.

Author
SMFSW

BMP180: Digital pressure sensor

Macro Definition Documentation

◆ BMP180_BASE_ADDR

#define BMP180_BASE_ADDR   0x77U

BMP180 Base address.

Note
Define BMP180_BASE_ADDR to change default device base address

◆ I2C_BMP180_NB

#define I2C_BMP180_NB   1U

Number of BMP180 peripherals.

Note
Define I2C_BMP180_NB to enable multiple peripherals of this type

Enumeration Type Documentation

◆ BMP180_meas

BMP180 measure types.

Enumerator
BMP180__MEAS_TEMPERATURE 

Temperature.

BMP180__MEAS_PRESSURE 

Pressure.

◆ BMP180_oversampling

Oversampling enum of BMP180.

Enumerator
BMP180__OSS_1_TIME 

Oversampling 1 time.

BMP180__OSS_2_TIME 

Oversampling 1 time.

BMP180__OSS_4_TIME 

Oversampling 1 time.

BMP180__OSS_8_TIME 

Oversampling 1 time.

◆ BMP180_reg

enum BMP180_reg

Register map enum of BMP180.

Enumerator
BMP180__CALIB_AC1_MSB 

AC1 MSB.

BMP180__CALIB_AC1_LSB 

AC1 LSB.

BMP180__CALIB_AC2_MSB 

AC2 MSB.

BMP180__CALIB_AC2_LSB 

AC2 LSB.

BMP180__CALIB_AC3_MSB 

AC3 MSB.

BMP180__CALIB_AC3_LSB 

AC3 LSB.

BMP180__CALIB_AC4_MSB 

AC4 MSB.

BMP180__CALIB_AC4_LSB 

AC4 LSB.

BMP180__CALIB_AC5_MSB 

AC5 MSB.

BMP180__CALIB_AC5_LSB 

AC5 LSB.

BMP180__CALIB_AC6_MSB 

AC6 MSB.

BMP180__CALIB_AC6_LSB 

AC6 LSB.

BMP180__CALIB_B1_MSB 

B1 MSB.

BMP180__CALIB_B1_LSB 

B1 LSB.

BMP180__CALIB_B2_MSB 

B2 MSB.

BMP180__CALIB_B2_LSB 

B2 LSB.

BMP180__CALIB_MB_MSB 

MB MSB.

BMP180__CALIB_MB_LSB 

MB LSB.

BMP180__CALIB_MC_MSB 

MC MSB.

BMP180__CALIB_MC_LSB 

MC LSB.

BMP180__CALIB_MD_MSB 

MD MSB.

BMP180__CALIB_MD_LSB 

MD LSB.

BMP180__ID 

Identifier.

BMP180__VERSION 

Version.

BMP180__SOFT_RESET 

Software reset.

BMP180__CTRL_MEAS 

Measurements Control.

BMP180__OUT_MSB 

Output MSB.

BMP180__OUT_LSB 

Output LSB.

BMP180__OUT_XLSB 

Output XLSB.

Function Documentation

◆ BMP180_Init()

FctERR BMP180_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization for BMP180 peripheral.

Parameters
[in]idx- BMP180 index
[in]hi2c- pointer to BMP180 I2C instance
[in]devAddress- BMP180 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BMP180_Init_Single()

FctERR BMP180_Init_Single ( void )

Initialization for BMP180 peripheral.

Warning
In case multiple devices (defined by I2C_BMP180_NB > 1), you shall use BMP180_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ BMP180_Read()

FctERR BMP180_Read ( I2C_slave_t *const pSlave,
uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for BMP180.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BMP180_Read_Word()

FctERR BMP180_Read_Word ( I2C_slave_t *const pSlave,
uint16_t * data,
const uint16_t addr )

I2C Word Read function for BMP180.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BMP180_Write()

FctERR BMP180_Write ( I2C_slave_t *const pSlave,
const uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Write function for BMP180.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: