From 1ac3026c039cb15dd8c110c84215096854c3c804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Mar 2016 16:36:04 +0100 Subject: Some chages in configuration build --- include/mcu/Kconfig | 6 +++--- include/mcu/atmega328p.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/mcu/Kconfig b/include/mcu/Kconfig index ef99dbd..cecefdf 100644 --- a/include/mcu/Kconfig +++ b/include/mcu/Kconfig @@ -7,8 +7,8 @@ config MMCU choice MCU prompt "Microcontroller (MMCU)" -source include/mcu/atmega328p.Kconfig -source include/mcu/attiny85.Kconfig -source include/mcu/attiny4313.Kconfig +source "$IOEROOT/include/mcu/atmega328p.Kconfig" +source "$IOEROOT/include/mcu/attiny85.Kconfig" +source "$IOEROOT/include/mcu/attiny4313.Kconfig" endchoice diff --git a/include/mcu/atmega328p.h b/include/mcu/atmega328p.h index 994e9e6..38615bd 100644 --- a/include/mcu/atmega328p.h +++ b/include/mcu/atmega328p.h @@ -9,9 +9,9 @@ #define IO_B 0 #define IO_C 1 #define IO_D 2 -#define IO_PIN(GROUP) (* (volatile uint8_t *)(PINB + 0x3*GROUP)) -#define IO_DDR(GROUP) (* (volatile uint8_t *)(DDRB + 0x3*GROUP)) -#define IO_PORT(GROUP) (* (volatile uint8_t *)(PORTB + 0x3*GROUP)) +#define IO_PIN(GROUP) _SFR_IO8(0x03 * (1 + GROUP)) +#define IO_DDR(GROUP) _SFR_IO8(0x04 * (1 + GROUP)) +#define IO_PORT(GROUP) _SFR_IO8(0x05 * (1 + GROUP)) #define IO_B0 IO_B, (1 << 0) #define IO_B1 IO_B, (1 << 1) #define IO_B2 IO_B, (1 << 2) -- cgit v1.2.3