Rename and reorder enum values to make DigitalInput and AnalogInput similar.
Merge two if statements.