Files
charge-controller-firmware/zephyr/dts/bindings/adc-inputs.yaml
T
Martin Jäger ef9c8571cc ADC filter time constant configurable per channel
Add a filter-const prop to the adc_inputs devicetree binding and use it instead
of the global ADC_FILTER_CONST in daq.cpp.
2020-09-21 13:29:31 +02:00

48 lines
1.2 KiB
YAML

# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020 Martin Jäger / Libre Solar
description: Description for an ADC input including gain (multiplier/divider) and offset
compatible: "adc-inputs"
child-binding:
description: ADC inputs child node
properties:
io-channels:
type: phandle-array
required: true
description: |
ADC channel for this input.
multiplier:
type: int
required: true
description: |
Resistance of the lower leg of the voltage divider.
divider:
type: int
required: true
description: |
Resistance of the full path through the voltage divider.
offset:
type: int
required: false
description: |
Offset to be substracted from ADC raw reading before applying the gain
filter-const:
type: int
default: 5
description: Low-pass filter multiplier 1/(2^filter-const)
enable-gpios:
type: phandle-array
required: false
description: |
Enable the voltage divider input or amplifier.
If present the corresponding GPIO must be set to an active level
to enable the divider input.