项目作者: pawelkn

项目描述 :
Generic GPIO impulse counter driver. Counts impulses using GPIO interrupts.
高级语言: C
项目地址: git://github.com/pawelkn/gpio-counter.git
创建时间: 2017-02-08T11:25:34Z
项目社区:https://github.com/pawelkn/gpio-counter

开源协议:

下载


gpio-counter

Generic GPIO impulse counter. Counts impulses using GPIO interrupts.
Can be activated on low or high level. If needed,
a debounce procedure can be performed.

Cross-compile build

  1. export PATH=<path to toolchain executables>
  2. export KERNEL_DIR=<path to kernel build directory>
  3. export CROSS_COMPILE=<cross compilation prefix>
  4. export ARCH=<architecture eg.: arm>
  5. make

Device tree bindings

Required properties:

  • gpios: a spec for a GPIO to be used

Optional properties:

  • debounce-delay-us: pulse debounce duration

Example:

  1. counter {
  2. compatible = "gpio-counter";
  3. gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  4. debounce-delay-us = <2>;
  5. };