src/app/host-serial/libftdi/ftdi.c
static unsigned char bit2type(unsigned char bits)
{
    switch (bits)
    {
        case   0: return CHANNEL_IS_UART;
        case   1: return CHANNEL_IS_FIFO;
        case   2: return CHANNEL_IS_OPTO;
        case   4: return CHANNEL_IS_CPU;
        case   8: return CHANNEL_IS_FT1284;
        default:
            fprintf(stderr," Unexpected value %d for Hardware Interface type\n",
                    bits);
    }
    return 0;
}
/* Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted
 * EEPROM structure
 *
 * FTD2XX doesn't allow to set multiple bits in the interface mode bitfield, and so do we
 */
Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted
EEPROM structure

FTD2XX doesn't allow to set multiple bits in the interface mode bitfield, and so do we
Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted EEPROM structure FTD2XX doesn ' t allow to set multiple bits in the interface mode bitfield and so do we
static unsigned char bit2type(unsigned char bits)
{
    switch (bits)
    {
        case   0: return CHANNEL_IS_UART;
        case   1: return CHANNEL_IS_FIFO;
        case   2: return CHANNEL_IS_OPTO;
        case   4: return CHANNEL_IS_CPU;
        case   8: return CHANNEL_IS_FT1284;
        default:
            fprintf(stderr," Unexpected value %d for Hardware Interface type\n",
                    bits);
    }
    return 0;
}
static unsigned char bit2type ( unsigned char bits ) { switch ( bits ) { case 0 : return CHANNEL_IS_UART ; case 1 : return CHANNEL_IS_FIFO ; case 2 : return CHANNEL_IS_OPTO ; case 4 : return CHANNEL_IS_CPU ; case 8 : return CHANNEL_IS_FT1284 ; default : fprintf ( stderr , " \n " , bits ) ; } return 0 ; }
Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted
 EEPROM structure
Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted EEPROM structure