Digital pressure sensor driver. More...

#include <stdint.h>
Include dependency graph for BMP180.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BMP180_CHIP_ID   0x55
 Chip ID.
 
#define BMP180_ADDRESS_READ   0xEF
 Device address for read operations.
 
#define BMP180_ADDRESS_WRITE   0xEE
 Device address for write operations.
 

Enumerations

enum  BMP180_ControlRegValue {
  OSS_TEMPERATURE = 0x2E, OSS_PRESSURE_ULTRA_LOW_PWR = 0x34, OSS_PRESSURE_DEFAULT = 0x74, OSS_PRESSURE_HIGH_RES = 0xB4,
  OSS_PRESSURE_ULTRA_HIGH_RES = 0xF4
}
 Hardware pressure sampling accuracy modes. More...
 

Functions

int BMP180_Init (void)
 Initialise BMP180 driver. More...
 
int BMP180_ReadTemperature (int8_t *ps8Temp)
 Read current temperature. More...
 

Detailed Description

Digital pressure sensor driver.

Definition in file BMP180.h.

Enumeration Type Documentation

◆ BMP180_ControlRegValue

Hardware pressure sampling accuracy modes.

Control registers values for different internal oversampling_setting (oss)

Enumerator
OSS_TEMPERATURE 

Temperature, max conversion time 4.5ms.

OSS_PRESSURE_ULTRA_LOW_PWR 

Ultra low power, max. conversion time 4.5ms, 3uA.

OSS_PRESSURE_DEFAULT 

Standard, max. conversion time 7.5ms, 5uA.

OSS_PRESSURE_HIGH_RES 

High resolution, max. conversion time 13.5ms, 7uA.

OSS_PRESSURE_ULTRA_HIGH_RES 

Ultra-high resolution, max conversion time 25.5ms, 12uA.

Definition at line 22 of file BMP180.h.

Function Documentation

◆ BMP180_Init()

int BMP180_Init ( void  )

Initialise BMP180 driver.

Returns
Error code
Return values
0OK
-1Error

Definition at line 90 of file BMP180.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BMP180_ReadTemperature()

int BMP180_ReadTemperature ( int8_t *  ps8Temp)

Read current temperature.

Parameters
ps8TempTemperature in 1°C
Returns
Error code
Return values
0OK
-1Error

Definition at line 132 of file BMP180.c.

Here is the call graph for this function:
Here is the caller graph for this function: