Replace 'if else' construction with switch case
White space fixes; no code changes
Split protocol defines into seperate header file just as in libser4010
Default to error if no result code is set
Allow setting data encoding on Si4010