Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: adc: Fix overflow calculation bug in voltage divider. #31

Commits on Mar 15, 2024

  1. drivers: adc: Fix overflow calculation bug in voltage divider.

    The calculation to adjust a voltage divider value can overflow
    the 32-bit max when using a large `full_ohms` causing the calculation
    to be off. Cast up to 64-bits during the calculation to avoid this.
    
    Signed-off-by: Peter Johanson <[email protected]>
    petejohanson committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4a6562e View commit details
    Browse the repository at this point in the history