diff options
author | Karel Kočí <cynerd@email.cz> | 2015-03-14 11:38:29 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-03-14 11:38:29 +0100 |
commit | 082a9165f0aceed31f659a4c2568f8c473e417ef (patch) | |
tree | 1019dcacc17e615ac5e28d6064bb4c03d4199dc9 /mcu | |
parent | 401d8ce02e0638f96d66b9ac1f0b43219b2d20d2 (diff) | |
download | avr-ioe-082a9165f0aceed31f659a4c2568f8c473e417ef.tar.gz avr-ioe-082a9165f0aceed31f659a4c2568f8c473e417ef.tar.bz2 avr-ioe-082a9165f0aceed31f659a4c2568f8c473e417ef.zip |
Add required mcu specifications
Added mcu specification for previous commits.
Diffstat (limited to 'mcu')
-rw-r--r-- | mcu/ATmega328P.h | 11 | ||||
-rw-r--r-- | mcu/ATmega32U4.h | 10 | ||||
-rw-r--r-- | mcu/ATtiny4313.h | 11 | ||||
-rw-r--r-- | mcu/ATtiny85.h | 11 | ||||
-rw-r--r-- | mcu/mcu.h | 19 |
5 files changed, 62 insertions, 0 deletions
diff --git a/mcu/ATmega328P.h b/mcu/ATmega328P.h new file mode 100644 index 0000000..c26d55d --- /dev/null +++ b/mcu/ATmega328P.h @@ -0,0 +1,11 @@ +/* This is specific configuration for ATmega328P. + * Also applies on ATmega48A, ATmega48PA, ATmega88A, ATmega88PA, ATmega168A and + * ATmega168PA. + */ +#include <avr/io.h> + +#define DDR_SPI DDRB +#define DD_SS DDB2 +#define DD_MOSI DDB3 +#define DD_MISO DDB4 +#define DD_SCLK DDB5 diff --git a/mcu/ATmega32U4.h b/mcu/ATmega32U4.h new file mode 100644 index 0000000..204dce4 --- /dev/null +++ b/mcu/ATmega32U4.h @@ -0,0 +1,10 @@ +/* This is specific configuration for ATmega32U4. + * This configuration also applies on ATmega16U4. + */ +#include <avr/io.h> + +#define DDR_SPI DDRB +#define DD_SS DDB0 +#define DD_MOSI DDB2 +#define DD_MISO DDB3 +#define DD_SCLK DDB5 diff --git a/mcu/ATtiny4313.h b/mcu/ATtiny4313.h new file mode 100644 index 0000000..fca810b --- /dev/null +++ b/mcu/ATtiny4313.h @@ -0,0 +1,11 @@ +/* This is specific configuration for ATtiny4313. + * This configuration also applies on ATtiny2313A. + */ +#include <avr/io.h> + +#define USI_DIR_REG DDRB +#define USI_OUT_REG PORTB +#define USI_IN_REG PINB +#define USI_USCK_PIN PORTB7 +#define USI_DO_PIN PORTB6 +#define USI_DI_PIN PORTB5 diff --git a/mcu/ATtiny85.h b/mcu/ATtiny85.h new file mode 100644 index 0000000..9ecbbcc --- /dev/null +++ b/mcu/ATtiny85.h @@ -0,0 +1,11 @@ +/* This is specific configuration for ATtiny85. + * This configuration also applies on ATtiny45 and ATtiny25. + */ +#include <avr/io.h> + +#define USI_DIR_REG DDRB +#define USI_OUT_REG PORTB +#define USI_IN_REG PINB +#define USI_USCK_PIN PORTB2 +#define USI_DO_PIN PORTB1 +#define USI_DI_PIN PORTB0 diff --git a/mcu/mcu.h b/mcu/mcu.h new file mode 100644 index 0000000..2caf432 --- /dev/null +++ b/mcu/mcu.h @@ -0,0 +1,19 @@ +#if (defined __AVR_ATmega328P__ || defined __AVR_ATmega328__ || \ + defined __AVR_ATmega1688PA__ || defined __AVR_ATmega168A__ || \ + defined __AVR_ATmega88PA__ || defined __AVR_ATmega88A__ || \ + defined __AVR_ATmega48PA__ || defined AVR_ATmega48A__) +#include "ATmega328P.h" +#endif + +#if (defined __AVR_ATmega328U4__ || defined __AVR_ATmega16U4) +#include "ATmega32U4.h" +#endif + +#if (defined __AVR_ATtiny4313__ || defined __AVR_ATtiny2313A__) +#include "ATtiny4313.h" +#endif + +#if (defined __AVR_ATtiny85__ || defined __AVR_ATtiny45__ || \ + defined __AVR_ATtiny25__) +#include "ATtiny85.h" +#endif |