Stop light switch is installed to brake pedal bracket.
ECM detects the state of the brake pedal by those two types of input (ON/OFF signal).