public String toString() {
        boolean i2c = false;
        boolean spi = false;

        StringBuffer sb = new StringBuffer();
        sb.append(getName());
        sb.append(":Handle[");
        sb.append(getHandle());
        sb.append("],Id[");
        sb.append(getId());
        sb.append("],Rev[");
        sb.append(Integer.toHexString(getRev()));
        sb.append("],Serial[");
        sb.append(getSerial());
        sb.append("],Listener[");
        sb.append(listeners.size());
        sb.append("],SpecialMode: ");
        if ((specialMode & SpecialModeFunction.SMF_LCD_ID)
                == SpecialModeFunction.SMF_LCD_ID)
            sb.append("LCD ");
        if ((specialMode & SpecialModeFunction.SMF_CPS_ID)
                == SpecialModeFunction.SMF_CPS_ID)
            sb.append("CPS ");
        if ((specialMode & SpecialModeFunction.SMF_SMX_ID)
                == SpecialModeFunction.SMF_SMX_ID)
            sb.append("SMX ");
        if ((specialMode & SpecialModeFunction.SMF_SMX16_ID)
                == SpecialModeFunction.SMF_SMX16_ID)
            sb.append("SMX16 ");
        if ((specialMode & SpecialModeFunction.SMF_I2C_ID)
                == SpecialModeFunction.SMF_I2C_ID) {
            sb.append("I2C");
            i2c = true;
        }
        sb.append("\n\t");
        sb.append(ports[0].toString());
        sb.append("\n\t");
        sb.append(ports[1].toString());
        sb.append("\n\t");
        sb.append(ports[2].toString());
        sb.append("\n\t");
        sb.append(ports[3].toString());
        if (i2c) {
            sb.append("\n\t");
            for (int i = 0; i < smfImplementations.size(); i++) {
                SpecialModeFunction smf =
                        (SpecialModeFunction) smfImplementations.get(i);
                if (smf.getSpecialModeFuncionId()
                        == SpecialModeFunction.SMF_I2C_ID) {
                    sb.append(smf.toString());
                    break;
                }
            }
        }
        sb.append("\n");
        return sb.toString();
    }