Add support for ATmega8535, ATmega16 and ATmega32

Issue #8 resolved
Hans Eirik Bull created an issue

Hi! I'm the maintainer of the MightyCore, and I'd really appreciate if you added support for the ATmega8535, ATmega16 and ATmega32. These are very similar to the ATmega8 when it comes to register names. It should be an easy fix 😃

Comments (5)

  1. Tim Eckel repo owner

    It appears they have the same timer addresses names as the ATmega8.

    In the NewPing.h file change the line that currently reads:

    #if defined (__AVR_ATmega8__)
    

    To this:

    #if defined (__AVR_ATmega8__) || defined (__AVR_ATmega16__) || defined (__AVR_ATmega32__) || defined (__AVR_ATmega8535__)
    

    That should take care of it. Let me know!

    Tim

  2. Hans Eirik Bull reporter

    Yes, they are very similar to the ATmega8. The extended ifdef in the header file almost did the trick. You still need to add it to line 249 and 277 in the newPing.cpp file, then it compiles.

  3. Log in to comment