Skip to content
Snippets Groups Projects
  • Joakim Nohlgård's avatar
    57f60819
    sys/analog_util: Refactor adc_map, fix compilation · 57f60819
    Joakim Nohlgård authored
    Change the API to use int32_t instead of int, to allow for greater
    flexibility on 8- and 16-bit platforms. Removed limitation on input
    arguments that min < max. Times where it can be useful to have min > max
    is when measuring a sensor where a higher measured voltage means a lower
    physical value. For example a thermistor can be connected so that the
    measured voltage goes down when the temperature goes up.
    57f60819
    History
    sys/analog_util: Refactor adc_map, fix compilation
    Joakim Nohlgård authored
    Change the API to use int32_t instead of int, to allow for greater
    flexibility on 8- and 16-bit platforms. Removed limitation on input
    arguments that min < max. Times where it can be useful to have min > max
    is when measuring a sensor where a higher measured voltage means a lower
    physical value. For example a thermistor can be connected so that the
    measured voltage goes down when the temperature goes up.