px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
px_bmp280.h
1#ifndef __PX_BMP280_H__
2#define __PX_BMP280_H__
3/* =============================================================================
4 ____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
5 | _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
6 | |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
7 | __/ | | | |___ | |_| | | |\ | | |_| | | | | | | | / \
8 |_| |___| \____| \___/ |_| \_| \___/ |_| |_| |___| /_/\_\
9
10 Copyright (c) 2018 Pieter Conradie <https://piconomix.com>
11
12 License: MIT
13 https://github.com/piconomix/px-fwlib/blob/master/LICENSE.md
14
15 Title: Bosch BMP280 Barometric pressure sensor driver
16 Author(s): Pieter Conradie
17 Creation Date: 2018-07-12
18
19============================================================================= */
20
21/**
22 * @ingroup DEVICES_SENSOR
23 * @defgroup PX_BMP280 px_bmp280.h : Bosch BMP280 Barometric pressure sensor driver
24 *
25 * File(s):
26 * - devices/sensor/inc/px_bmp280.h
27 * - devices/sensor/src/px_bmp280.c
28 *
29 * Reference:
30 * - [Bosch BMP280 datasheet](https://www.bosch-sensortec.com/bst/products/all_products/bmp280)
31 *
32 * @{
33 */
34
35/* _____STANDARD INCLUDES____________________________________________________ */
36
37/* _____PROJECT INCLUDES_____________________________________________________ */
38#include "px_defs.h"
39#include "px_i2c.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44/* _____DEFINITIONS__________________________________________________________ */
45/// BMP280 I2C Slave address
46#define PX_BMP280_I2C_SLA_ADR 0x76
47
48/* _____TYPE DEFINITIONS_____________________________________________________ */
49
50/* _____GLOBAL VARIABLES_____________________________________________________ */
51
52/* _____GLOBAL FUNCTION DECLARATIONS_________________________________________ */
53extern bool px_bmp280_init(px_i2c_handle_t * handle);
54extern bool px_bmp280_rd(int32_t * temp, int32_t * press);
55
56/* _____MACROS_______________________________________________________________ */
57
58#ifdef __cplusplus
59}
60#endif
61
62/// @}
63#endif
Define I2C handle for a slave.
Definition: px_i2c.h:104