Skip to content

Commit

Permalink
Merge pull request #17 from electricimp/develop
Browse files Browse the repository at this point in the history
fixed typo in configureFifoInterrupt
  • Loading branch information
betzrhodes authored Mar 15, 2018
2 parents 5b7d2b3 + cafa2b1 commit 0c5b145
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions LIS3DH.device.lib.nut
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const LIS3DH_ADC2 = 0x02;
const LIS3DH_ADC3 = 0x03;

class LIS3DH {
static VERSION = "2.0.0";
static VERSION = "2.0.1";

// I2C information
_i2c = null;
Expand Down Expand Up @@ -302,15 +302,15 @@ class LIS3DH {
// Enable/disable the FIFO buffer
_setRegBit(LIS3DH_CTRL_REG5, 6, enable ? 1 : 0);

if (state) {
if (enable) {
// Stream-to-FIFO mode, watermark of [28].
_setReg(LIS3DH_FIFO_CTRL_REG, (fifomode & 0xc0) | (watermark & 0x1F));
} else {
_setReg(LIS3DH_FIFO_CTRL_REG, 0x00);
}

// Enable/disable watermark interrupt
_setRegBit(LIS3DH_CTRL_REG3, 2, state ? 1 : 0);
_setRegBit(LIS3DH_CTRL_REG3, 2, enable ? 1 : 0);

}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This library also supports the LIS2DH12, another widely used three-axis MEMS acc

The LIS3DH can interface over I²C or SPI. This class addresses only I²C for the time being.

**To add this library to your project, add** `#require "LIS3DH.device.lib.nut:2.0.0"` **to the top of your device code**
**To add this library to your project, add** `#require "LIS3DH.device.lib.nut:2.0.1"` **to the top of your device code**

## Class Usage

Expand Down

0 comments on commit 0c5b145

Please sign in to comment.