def get_channel_config_command(channel, power_down, gain, input_type, bias,
    srb2, srb1):
    """Get command string for the given parameters.

    See
    :func:`Cyton.configure_channel<openbci_interface.cyton.Cyton.configure_channel>`
    """
    command = [b'x']
    vals = {(1): b'1', (9): b'Q', (2): b'2', (10): b'W', (3): b'3', (11):
        b'E', (4): b'4', (12): b'R', (5): b'5', (13): b'T', (6): b'6', (14):
        b'Y', (7): b'7', (15): b'U', (8): b'8', (16): b'I'}
    if channel not in vals:
        raise ValueError('`channel` value must be one of %s' % vals.keys())
    command.append(vals[channel])
    vals = {(0): b'0', 'ON': b'0', (1): b'1', 'OFF': b'1'}
    if power_down not in vals:
        raise ValueError('`power_down` must be one of %s' % vals.keys())
    command.append(vals[power_down])
    vals = {(1): b'0', (2): b'1', (4): b'2', (6): b'3', (8): b'4', (12):
        b'5', (24): b'6'}
    if gain not in vals:
        raise ValueError('`gain` value must be one of %s' % vals.keys())
    command.append(vals[gain])
    vals = {(0): b'0', 'NORMAL': b'0', (1): b'1', 'SHORTED': b'1', (2):
        b'2', 'BIAS_MEAS': b'2', (3): b'3', 'MVDD': b'3', (4): b'4', 'TEMP':
        b'4', (5): b'5', 'TESTSIG': b'5', (6): b'6', 'BIAS_DRP': b'6', (7):
        b'7', 'BIAS_DRN': b'7'}
    if input_type not in vals:
        raise ValueError('`input_type` type value must be one of %s.' %
            vals.keys())
    command.append(vals[input_type])
    vals = {(0): b'0', (1): b'1'}
    if bias not in vals.keys():
        raise ValueError('`bias` must be either 0 or 1.')
    command.append(vals[bias])
    vals = {(0): b'0', (1): b'1'}
    if srb2 not in vals.keys():
        raise ValueError('`srb2` must be either 0 or 1.')
    command.append(vals[srb2])
    vals = {(0): b'0', (1): b'1'}
    if srb1 not in vals.keys():
        raise ValueError('`srb1` must be either 0 or 1.')
    command.append(vals[srb1])
    command.append(b'X')
    return b''.join(command)
