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/atmega328p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/mcu/atmega328p.h') 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