Skip to content

IRNAS/irnas-lis2dw12-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

irnas-lis2dw12-driver

This lis2dw12 driver is updated version of zephyr lis2dw12, with additional trigger functionality. It provides sensor support (I2C and SPI) as well as interrupt configuration options.

Instalation

This driver was written and tested for nrf-sdk v2.2.0

To install, first modify .../ncs/nrf/west.yml and add the following sections:

  1. In remotes, add the following if not already added:
 - name: irnas
   url-base: https://github.com/irnas
  1. In the projects section add at the bottom:
- name: irnas-lis2dw12-driver
    repo-path: irnas-lis2dw12-driver
    path: irnas/irnas-lis2dw12-driver
    remote: irnas
    revision: master

Then run west update in your freshly created bash/command prompt session.

Above command will clone irnas-lis2dw12-driver repository inside of ncs/irnas/. You can now use the driver in your application projects.

Usage

To enable this driver, device tree, KConfig and peripheral driver modifications are reqired.

Device tree

In your boards DTS file, modify the lis2dw12 peripheral:

  • compatible = "st,lis2dw12"; - This must replace the default compatible value.

An example is provided here:

lis2dw12_accel: lis2dw12-accel@19 {
        compatible = "irnas,lis2dw12";
        label = "LIS2DW12-ACCEL";
        reg = <0x19>;
        irq-gpios=<&gpio1 3 GPIO_ACTIVE_LOW>;
        int-pin = <1>;
        range = <2>;
        power-mode = <0>;
        tap-mode= <0>;
        tap-threshold = <3>, <0>, <1>;
        tap-shock = <1>;
        tap-latency = <8>;
        tap-quiet = <3>;
    };

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors