Inverting schmitt trigger based on op-amp (comparator). 44KOhm feedback resistor controls hysteresis range. Voltage devider resisters controls threshold hi and lo voltage.
The real op-amp or comparator like lm324 has Vhi = VCC - 1.5V, so real out for 3V3 VCC will be 3.3-1.5 = 1.8V.
Hysteresis calculates easily.
1. First you need to set center point for reference (IN+) using resitor voltage devider. In this circuit it set with 22k and 10k resistors to ~1V.
2. Then you apply a feed back resitance that will work as parallel resistor circuit applying its value to high (VCC) or low (GND) divider side depending on Op-Amp out level, so it will shift divider voltage creating a hysteresis.
Calculation:
1. First calc high side parallel resistor:
Req = (22 * 44) / (22 + 44) =14.67K
2. Then low side:
Req = (10*44)/(10+44) = 8.15k
3. Then calc devider voltage with Req for high out:
10/(14.67+10)*3.3 = 1.3V
4. Then for low out:
8.15/(22+8.15)*3.3 = 0.89V
You need to know formula for voltage divider:
Vout = R2 / (R1 + R2) * Vin, R1 - high side
And formula for parallel resistor connection:
R = (Rx * Ry) / (Rx + Ry).
TI Design of Hysteresis Comparator
https://www.ti.com/lit/ug/tidu020a/tidu020a.pdf