aboutsummaryrefslogtreecommitdiff
path: root/include/mcu
diff options
context:
space:
mode:
Diffstat (limited to 'include/mcu')
-rw-r--r--include/mcu/Kconfig6
-rw-r--r--include/mcu/atmega328p.h6
2 files changed, 6 insertions, 6 deletions
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)