Enable protective compiler flags for door manager example
Fix Return value for pin switch function