forked from tinygo-org/drivers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registers.go
56 lines (49 loc) · 975 Bytes
/
registers.go
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
// Package bmp280 provides a driver for the BMP280 digital temperature & pressure sensor by Bosch.
//
// Datasheet: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf
package bmp280
// The I2C address which this device listens to.
const Address = 0x77
// Registers
const (
REG_ID = 0xD0 // WHO_AM_I
REG_RESET = 0xE0
REG_STATUS = 0xF3
REG_CTRL_MEAS = 0xF4
REG_CONFIG = 0xF5
REG_TEMP = 0xFA
REG_PRES = 0xF7
REG_CALI = 0x88
CHIP_ID = 0x58
CMD_RESET = 0xB6
)
const (
SAMPLING_SKIPPED Oversampling = iota
SAMPLING_1X
SAMPLING_2X
SAMPLING_4X
SAMPLING_8X
SAMPLING_16X
)
const (
MODE_SLEEP Mode = 0x00
MODE_FORCED Mode = 0x01
MODE_NORMAL Mode = 0x03
)
const (
STANDBY_1MS Standby = iota
STANDBY_63MS
STANDBY_125MS
STANDBY_250MS
STANDBY_500MS
STANDBY_1000MS
STANDBY_2000MS
STANDBY_4000MS
)
const (
FILTER_OFF Filter = iota
FILTER_2X
FILTER_4X
FILTER_8X
FILTER_16X
)