lm3s1968: replace switch-case statements with if-then-else.