Adafruit Library
Functions
Wippersnapper_AnalogIO.cpp File Reference
#include "Wippersnapper_AnalogIO.h"

Functions

void calculateHysteresis (analogInputPin pin, uint16_t pinValRaw, uint16_t &pinValThreshHi, uint16_t &pinValThreshLow)
 Calculates the hysteresis for the pin value. More...
 

Detailed Description

This file provides an API for interacting with a board's analog IO pins.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Copyright (c) Brent Rubell 2020-2023 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

Function Documentation

◆ calculateHysteresis()

void calculateHysteresis ( analogInputPin  pin,
uint16_t  pinValRaw,
uint16_t &  pinValThreshHi,
uint16_t &  pinValThreshLow 
)

Calculates the hysteresis for the pin value.

Parameters
pinThe desired analog pin to calculate hysteresis for.
pinValRawThe pin's raw value.
pinValThreshHiThe pin's high threshold value.
pinValThreshLowThe pin's low threshold value.