-
Notifications
You must be signed in to change notification settings - Fork 0
/
ms560702ba03.h
85 lines (47 loc) · 1.62 KB
/
ms560702ba03.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef DRIVER_SUBMODULE_TEMPERATURE_SENSOR_MS560702BA03_MS560702BA03_H_
#define DRIVER_SUBMODULE_TEMPERATURE_SENSOR_MS560702BA03_MS560702BA03_H_
#define CC1310
#define MS567072BA03
#include <stdint.h>
#ifdef CC1310
#include <ti/drivers/I2C.h>
#endif
#ifdef CC1312R1
#include <ti/drivers/I2C.h>
#include "ti_drivers_config.h"
#endif
#ifdef NRF52
#include "nrf_drv_twi.h"
#endif
#if defined(CC1310) || defined(CC1312R1)
void set_ms560702ba03_i2c_instance(I2C_Handle i2cInstance);
#endif
#ifdef MS567072BA03
#ifdef CC1312R1
#include <ti/drivers/I2C.h>
#include "ti_drivers_config.h"
#endif
#ifdef NRF52
#include "nrf_drv_twi.h"
#endif
#ifdef NRF52
extern volatile uint8_t app_timer_100_ms_timer;
extern volatile uint8_t twi_read_done;
extern volatile uint8_t twi_write_done;
extern volatile uint8_t twi_address_nack;
void set_ms560702ba03_i2c_instance(nrf_drv_twi_t twi_t);
#endif
uint8_t init_ms560702ba03(void);
void set_ms560702ba03_OSR(uint16_t osr);
uint8_t set_ms560702ba03_conversion_pressure(void);
uint8_t set_ms560702ba03_measure_pressure(void);
uint8_t get_ms560702ba03_pressure(uint32_t *pressure_output);
uint8_t set_ms560702ba03_conversion_temperature(void);
uint8_t set_ms560702ba03_measure_temperature(void);
uint8_t get_ms560702ba03_temperature(uint32_t *temperature_output);
void set_ms560702ba03_convert_temperature_pressure(uint32_t temperature,
uint32_t pressure);
int32_t get_ms560702ba03_convert_pressure(void);
int16_t get_ms560702ba03_convert_temperature(void);
#endif
#endif /* DRIVER_SUBMODULE_TEMPERATURE_SENSOR_MS560702BA03_MS560702BA03_H_ */