If the switch is controlled via a pin on the MCU then yes, otherwise I think the answer is probably no.
Pete.