greiman / DigitalIO

Fast Digital I/O, Software I2C, and Software SPI for AVR Arduino
125 stars 34 forks source link

Please Add Support to Atmega8 & Atmega8A #14

Open DevDavisNunez opened 2 years ago

DevDavisNunez commented 2 years ago

Any chance to add ATMEGA8 AND ATMEGA8 AVR support?

greiman commented 2 years ago

I don't have these chips or a board to test but I suspect you can add ATmega8 and ATmega8A by editing GpioPinMap.h.

change this section:

#if defined(__AVR_ATmega168__)\
||defined(__AVR_ATmega168P__)\
||defined(__AVR_ATmega328P__)
// 168 and 328 Arduinos
#include "UnoGpioPinMap.h"

To:

#if defined(__AVR_ATmega8__)\
||defined(__AVR_ATmega8A__)\
||defined(__AVR_ATmega88__)\
||defined(__AVR_ATmega88A__)\
||defined(__AVR_ATmega88P__)\
||defined(__AVR_ATmega88PA__)\
||defined(__AVR_ATmega168__)\
||defined(__AVR_ATmega168P__)\
||defined(__AVR_ATmega328P__)
// 8 88 168 and 328 Arduinos
#include "UnoGpioPinMap.h"

Let me know if it works.

DevDavisNunez commented 2 years ago

Yes, that is work fine, thanks dear!