adafruit / Adafruit_BME280_Library

Arduino Library for BME280 sensors
Other
336 stars 305 forks source link

register struct issues #28

Closed j07rdi closed 5 years ago

j07rdi commented 7 years ago

Refer to this code inside the *.h file:

unsigned int get() { return (t_sb << 5) | (filter << 3) | spi3w_en;}

unsigned int get() { return (osrs_t << 5) | (osrs_p << 3) | mode; }

I'm sure the bit shift 3 for "filter" and "osrs_p" should be 2, otherwise, it will overlap the t_sb and osrs_t bits values.

loadletter commented 6 years ago

I've also noticed this while using a simulator registers