src/AduProtocol.c
/**
 * Converts a port designator character (case-insensitive) to a corresponding
 * enumerator
 *
 * @param[in] inputPortChar The port designation character
 *
 * @return The corresponding port enumerator
 */
Converts a port designator character (case-insensitive) to a corresponding
enumerator

@param[in] inputPortChar The port designation character

@return The corresponding port enumerator
Converts a port designator character ( case - insensitive ) to a corresponding enumerator @param [ in ] inputPortChar The port designation character @return The corresponding port enumerator
static enum InputPort CharToInputPort(char inputPortChar)
{
    inputPortChar = toupper(inputPortChar);
    enum InputPort inputPort;
    switch (inputPortChar)
    {
        case 'A': inputPort = INPUT_PORT_A; break;
        case 'B': inputPort = INPUT_PORT_B; break;
        default: inputPort = INPUT_PORT_UNDEFINED; break;
    }
    return inputPort;
}
static enum InputPort CharToInputPort ( char inputPortChar ) { inputPortChar = toupper ( inputPortChar ) ; enum InputPort inputPort ; switch ( inputPortChar ) { case ' ' : inputPort = INPUT_PORT_A ; break ; case ' ' : inputPort = INPUT_PORT_B ; break ; default : inputPort = INPUT_PORT_UNDEFINED ; break ; } return inputPort ; }
Converts a port designator character (case-insensitive) to a corresponding
 enumerator
Converts a port designator character ( case - insensitive ) to a corresponding enumerator