Switch drive code