Update library to switch by AVR type

Instead of needing to change the lib when using another chip, add the
checks to recognize the used controller and select the fitting config.