Brake pedal position switch are installed to brake pedal bracket.
ECM detects the state of the brake pedal by those two types of input (ON/OFF signal).
Brake pedal
Brake pedal position switch
Released
ON
Depressed
OFF