1 /* Bosch BMP180 pressure sensor 2 * 3 * Copyright (c) 2024 Chris Ruehl 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 * 7 * Datasheet: 8 * https://www.mouser.hk/datasheet/2/783/BST-BMP180-DS000-1509579.pdf 9 */ 10 #ifndef ZEPHYR_DRIVER_SENSORS_BMP180_H 11 #define ZEPHYR_DRIVER_SENSORS_BMP180_H 12 13 /* Registers */ 14 #define BMP180_REG_CHIPID 0xD0 15 #define BMP180_REG_CMD 0xE0 16 #define BMP180_REG_MEAS_CTRL 0xF4 17 #define BMP180_REG_MSB 0xF6 18 #define BMP180_REG_LSB 0xF7 19 #define BMP180_REG_XLSB 0xF8 20 #define BMP180_REG_CALIB0 0xAA 21 #define BMP180_REG_CALIB21 0xBF 22 23 /* BMP180_REG_CHIPID */ 24 #define BMP180_CHIP_ID 0x55 25 26 /* BMP180_REG_STATUS */ 27 #define BMP180_STATUS_CMD_RDY BIT(5) 28 29 /* BMP180_REG_CMD */ 30 #define BMP180_CMD_SOFT_RESET 0xB6 31 #define BMP180_CMD_GET_TEMPERATURE 0x2E 32 #define BMP180_CMD_GET_OSS0_PRESS 0x34 33 #define BMP180_CMD_GET_OSS1_PRESS 0x74 /* 0x34 | OSR<<6 */ 34 #define BMP180_CMD_GET_OSS2_PRESS 0xB4 35 #define BMP180_CMD_GET_OSS3_PRESS 0xF4 36 37 /* command result waiting time in ms */ 38 #define BMP180_CMD_GET_TEMP_DELAY 3 39 #define BMP180_CMD_GET_OSS0_DELAY 3 40 #define BMP180_CMD_GET_OSS1_DELAY 6 41 #define BMP180_CMD_GET_OSS2_DELAY 12 42 #define BMP180_CMD_GET_OSS3_DELAY 24 43 44 #define BMP180_ULTRALOWPOWER 0x00 /* oversampling 1x */ 45 #define BMP180_STANDARD 0x01 /* oversampling 2x */ 46 #define BMP180_HIGHRES 0x02 /* oversampling 4x */ 47 #define BMP180_ULTRAHIGH 0x03 /* oversampling 8x */ 48 49 #endif /* ZEPHYR_DRIVER_SENSORS_BMP180_H */ 50