BlueNinja BSP  0.5
Cerevo BlueNinja(CDP-TZ01B) Board Support Packageリファレンスマニュアル
BMP280.h
[詳解]
1 
8 /*
9 Copyright 2015 Cerevo Inc.
10 
11 Licensed under the Apache License, Version 2.0 (the "License");
12 you may not use this file except in compliance with the License.
13 You may obtain a copy of the License at
14 
15  http://www.apache.org/licenses/LICENSE-2.0
16 
17 Unless required by applicable law or agreed to in writing, software
18 distributed under the License is distributed on an "AS IS" BASIS,
19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 See the License for the specific language governing permissions and
21 limitations under the License.
22 */
23 
24 #ifndef _BMP280_H_
25 #define _BMP280_H_
26 
27 #include <stdint.h>
28 #include <stdbool.h>
29 #include "Driver_I2C.h"
30 
31 #define BMP280_I2C_ADDR (0x76)
34 /* @{ */
35 #define BMP280_REG_CALIB00 (0x88)
36 #define BMP280_REG_CALIB25 (0xa1)
37 #define BMP280_REG_ID (0xd0)
38 #define BMP280_REG_RESET (0xe0)
39 #define BMP280_REG_STATUS (0xf3)
40 #define BMP280_REG_CTRL_MEAS (0xf4)
41 #define BMP280_REG_CONFIG (0xf5)
42 #define BMP280_REG_PRESS_MSB (0xf7)
43 #define BMP280_REG_PRESS_LSB (0xf8)
44 #define BMP280_REG_PRESS_XLSB (0xf9)
45 #define BMP280_REG_TEMP_MSB (0xfa)
46 #define BMP280_REG_TEMP_LSB (0xfb)
47 #define BMP280_REG_TEMP_XLSB (0xfc)
48 /* @} */
49 
51 /* @{ */
52 #define BMP280_BIT_RESET (0xb6)
53 /* @} */
54 
61 bool BMP280_drv_reset(void);
62 
67 uint8_t BMP280_drv_id_get(void);
68 
73 uint8_t BMP280_drv_status_get(void);
74 
82 bool BMP280_drv_ctrl_meas_set(uint8_t val);
83 
88 uint8_t BMP280_drv_ctrl_meas_get(void);
89 
97 bool BMP280_drv_config_set(uint8_t val);
98 
103 uint8_t BMP280_drv_config_get(void);
104 
109 uint32_t BMP280_drv_press_get(void);
110 
115 int32_t BMP280_drv_temp_get(void);
116 
124 bool BMP280_drv_init(ARM_DRIVER_I2C *i2c_drv);
125 
126 #endif /* _BMP280_H_ */
uint8_t BMP280_drv_config_get(void)
Read from CONFIG register.
Definition: BMP280.c:151
bool BMP280_drv_config_set(uint8_t val)
Write to CONFIG register.
Definition: BMP280.c:136
bool BMP280_drv_ctrl_meas_set(uint8_t val)
Write to MEAS register.
Definition: BMP280.c:101
bool BMP280_drv_init(ARM_DRIVER_I2C *i2c_drv)
Initialize BMP280 driver.
Definition: BMP280.c:304
uint8_t BMP280_drv_id_get(void)
Read from ID register.
Definition: BMP280.c:61
uint8_t BMP280_drv_status_get(void)
Read from STATUS register.
Definition: BMP280.c:81
uint32_t BMP280_drv_press_get(void)
Read from maesured value of Airpressure.
Definition: BMP280.c:171
uint8_t BMP280_drv_ctrl_meas_get(void)
Read from MEAS register.
Definition: BMP280.c:116
bool BMP280_drv_reset(void)
Reset BMP280.
Definition: BMP280.c:46
int32_t BMP280_drv_temp_get(void)
Read from maesured value of temperature.
Definition: BMP280.c:236