zephyr,tach-gpio

Description

These nodes are “tach” bus nodes.

Tachometer sensor using GPIO.

This tachometer sensor uses GPIO interrupts to measure the duration of one
pulse to calculate the RPM.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

gpios

phandle-array

GPIO used to measure pulses.

timeout-ms

int

Milliseconds to wait for a complete pulse.
Default is 1 s. This allows reading down to about 120 RPM (not 60
because the measurement might start right after a pulse start).

Default value: 1000

pulses-per-round

int

Number of pulses per round.

This property is required.

friendly-name

string

Human readable string describing the sensor. It can be used to
distinguish multiple instances of the same model (e.g., lid accelerometer
vs. base accelerometer in a laptop) to a host operating system.

This property is defined in the Generic Sensor Property Usages of the HID
Usage Tables specification
(https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5).