This is a battery capacity indicator for 3.7V lithium ion batteries, using a bi-color LED (red-green) common anode.
When the battery is from 100% to 50%, the LED stays green. When the capacity is from 50% to 20%, both LEDs turn on so it shows as yellow. When battery drops below 20% the green LED turns off leaving the red LED turned on.
It uses a schmitt trigger for both LEDs to prevent bounc...