From 9447247c1ab0b0a02c5ec87c138135953986975c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 22 Mar 2015 13:58:58 +0100 Subject: mcu definitions change and update --- mcu/ATmega328P.h | 16 +++++++++++----- mcu/ATmega32U4.h | 16 +++++++++++----- mcu/ATtiny4313.h | 17 +++++++++++------ mcu/ATtiny85.h | 15 +++++++++------ 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/mcu/ATmega328P.h b/mcu/ATmega328P.h index c26d55d..dc42233 100644 --- a/mcu/ATmega328P.h +++ b/mcu/ATmega328P.h @@ -4,8 +4,14 @@ */ #include -#define DDR_SPI DDRB -#define DD_SS DDB2 -#define DD_MOSI DDB3 -#define DD_MISO DDB4 -#define DD_SCLK DDB5 +// SPI +#define DDR_SPI DDRB +#define DD_SS DDB2 +#define DD_MOSI DDB3 +#define DD_MISO DDB4 +#define DD_SCLK DDB5 +#define PORT_SPI PORTB +#define PORT_SS PORTB2 +#define PORT_MOSI PORTB3 +#define PORT_MISO PORTB4 +#define PORT_SCLK PORTB5 diff --git a/mcu/ATmega32U4.h b/mcu/ATmega32U4.h index 204dce4..acf3a24 100644 --- a/mcu/ATmega32U4.h +++ b/mcu/ATmega32U4.h @@ -3,8 +3,14 @@ */ #include -#define DDR_SPI DDRB -#define DD_SS DDB0 -#define DD_MOSI DDB2 -#define DD_MISO DDB3 -#define DD_SCLK DDB5 +// SPI +#define DDR_SPI DDRB +#define DD_SS DDB0 +#define DD_SCLK DDB1 +#define DD_MOSI DDB2 +#define DD_MISO DDB3 +#define PORT_SPI PORTB +#define PORT_SS PORTB0 +#define PORT_SCLK PORTB1 +#define PORT_MOSI PORTB2 +#define PORT_MISO PORTB3 diff --git a/mcu/ATtiny4313.h b/mcu/ATtiny4313.h index fca810b..748f6ff 100644 --- a/mcu/ATtiny4313.h +++ b/mcu/ATtiny4313.h @@ -3,9 +3,14 @@ */ #include -#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 +// SPI USI +#define DDR_USI DDRB +#define DD_DI DDB5 +#define DD_DO DDB6 +#define DD_USCK DDB7 +#define PORT_USI PORTB +#define PORT_DI PORTB5 +#define PORT_DO PORTB6 +#define PORT_USCK PORTB7 + +// SPI USART diff --git a/mcu/ATtiny85.h b/mcu/ATtiny85.h index 9ecbbcc..57f53e7 100644 --- a/mcu/ATtiny85.h +++ b/mcu/ATtiny85.h @@ -3,9 +3,12 @@ */ #include -#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 +// SPI USI +#define DDR_USI DDRB +#define DD_DI DDB0 +#define DD_DO DDB1 +#define DD_USCK DDB2 +#define PORT_USI PORTB +#define PORT_DI PORTB0 +#define PORT_DO PORTB1 +#define PORT_USCK PORTB2 -- cgit v1.2.3