Theory of switching in polysilicon-n-p+ silicon structures