Commit 541dd70c7a1714073cf3e0347ecd8c6897531550
receivedThu, 15. Aug 2024, 16:16:04 (by user sx)
Thu, 15 Aug 2024 14:16:04 +0000 (16:16 +0200)
authorManfred Steiner <sx@htl-kaindorf.at>
Thu, 15 Aug 2024 14:15:58 +0000 (16:15 +0200)
committerManfred Steiner <sx@htl-kaindorf.at>
Thu, 15 Aug 2024 14:15:58 +0000 (16:15 +0200)
26 files changed:
software/nano-1284/test_2024-07-23/.gdb_history [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.gdbinit [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.gitignore [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.vscode/c_cpp_properties.json [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.vscode/launch.json [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.vscode/settings.json [new file with mode: 0644]
software/nano-1284/test_2024-07-23/.vscode/tasks.json [new file with mode: 0644]
software/nano-1284/test_2024-07-23/Makefile [new file with mode: 0644]
software/nano-1284/test_2024-07-23/README.md [new file with mode: 0644]
software/nano-1284/test_2024-07-23/src [new symlink]
software/nano-644/test_2024-07-23/src/main.cpp
software/nano-644/test_2024-07-23/src/main.hpp
software/nano-644/test_2024-07-23/src/units/cc1101.cpp
software/nano-644/test_2024-07-23/src/units/encoder.cpp
software/nano-644/test_2024-07-23/src/units/ieee485.cpp
software/nano-644/test_2024-07-23/src/units/lcd.cpp
software/nano-644/test_2024-07-23/src/units/led.cpp
software/nano-644/test_2024-07-23/src/units/modbus.cpp
software/nano-644/test_2024-07-23/src/units/motor.cpp
software/nano-644/test_2024-07-23/src/units/portexp.cpp
software/nano-644/test_2024-07-23/src/units/r2r.cpp
software/nano-644/test_2024-07-23/src/units/rgb.cpp
software/nano-644/test_2024-07-23/src/units/rtc8563.cpp
software/nano-644/test_2024-07-23/src/units/seg7.cpp
software/nano-644/test_2024-07-23/src/units/switch.cpp
software/nano-644/test_2024-07-23/src/units/uart1.cpp

diff --git a/software/nano-1284/test_2024-07-23/.gdb_history b/software/nano-1284/test_2024-07-23/.gdb_history
new file mode 100644 (file)
index 0000000..3339046
--- /dev/null
@@ -0,0 +1,9 @@
+target remote :1234
+layout split
+stepi
+quit
+target remote :1234
+layout split
+stepi
+b *main+9
+quit
diff --git a/software/nano-1284/test_2024-07-23/.gdbinit b/software/nano-1284/test_2024-07-23/.gdbinit
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/software/nano-1284/test_2024-07-23/.gitignore b/software/nano-1284/test_2024-07-23/.gitignore
new file mode 100644 (file)
index 0000000..a959910
--- /dev/null
@@ -0,0 +1,4 @@
+.depend
+**/build
+**/dist
+**/sim
diff --git a/software/nano-1284/test_2024-07-23/.vscode/c_cpp_properties.json b/software/nano-1284/test_2024-07-23/.vscode/c_cpp_properties.json
new file mode 100644 (file)
index 0000000..dda83a0
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    "configurations": [
+        {
+            "name": "Linux AVR",
+            "includePath": [
+                "/usr/lib/avr/include/**",
+                "/usr/lib/gcc/avr/**"
+            ],
+            "defines": [],
+            "compilerPath": "/usr/bin/avr-gcc",
+            "compilerArgs": [ "-mmcu=atmega1284p", "-DF_CPU=12000000", "-Os" ],
+            "cStandard": "gnu11",
+            "cppStandard": "gnu++11",
+            "intelliSenseMode": "linux-gcc-x64"
+        }
+    ],
+    "version": 4
+}
diff --git a/software/nano-1284/test_2024-07-23/.vscode/launch.json b/software/nano-1284/test_2024-07-23/.vscode/launch.json
new file mode 100644 (file)
index 0000000..f29cf2e
--- /dev/null
@@ -0,0 +1,37 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Build",
+            // "request": "launch",
+            "type": "node-terminal",
+            "preLaunchTask": "build"
+        },{
+            "name": "Flash",
+            // "request": "launch",
+            "type": "node-terminal",
+            "preLaunchTask": "flash"
+        },{
+            "name": "Clean",
+            // "request": "launch",
+            "type": "node-terminal",
+            "preLaunchTask": "clean"
+        },{
+            // es muss mit simuc --board arduino dist/programm.elf der Simulator 
+            // gestartet werden. Dessen gdb-stub öffnet auf localhost:1234 einen Port
+            "name": "Debug (simuc)",
+            "type": "cppdbg",
+            "request": "launch",
+            "program": "${workspaceFolder}/sim/atmega328p.elf",
+            "cwd": "${workspaceFolder}",
+            "externalConsole": false,
+            "MIMode": "gdb",
+            "miDebuggerPath": "/usr/bin/avr-gdb",
+            "miDebuggerServerAddress": ":1234",
+            "preLaunchTask": "build"
+        }
+    ]
+}
diff --git a/software/nano-1284/test_2024-07-23/.vscode/settings.json b/software/nano-1284/test_2024-07-23/.vscode/settings.json
new file mode 100644 (file)
index 0000000..58539af
--- /dev/null
@@ -0,0 +1,29 @@
+{
+    "[c]": {
+        "editor.insertSpaces": true,
+        "editor.tabSize": 3,
+        "editor.detectIndentation": false
+    },
+    "[cpp]": {
+        "editor.insertSpaces": true,
+        "editor.tabSize": 3,
+        "editor.detectIndentation": false
+    },
+    "[h]": {
+        "editor.insertSpaces": true,
+        "editor.tabSize": 3,
+        "editor.detectIndentation": false
+    },
+    "[hpp]": {
+        "editor.insertSpaces": true,
+        "editor.tabSize": 3,
+        "editor.detectIndentation": false
+    },
+    "cSpell.words": [],
+    "cSpell.ignorePaths": [
+        "**/*.json", "**/*.c", "**/*.h", "**/*.cpp", "**/*.hpp", "**/Makefile"
+    ],
+    "java.project.sourcePaths": [
+        "src/units"
+    ]
+}
diff --git a/software/nano-1284/test_2024-07-23/.vscode/tasks.json b/software/nano-1284/test_2024-07-23/.vscode/tasks.json
new file mode 100644 (file)
index 0000000..74fb1c7
--- /dev/null
@@ -0,0 +1,23 @@
+{
+    // See https://go.microsoft.com/fwlink/?LinkId=733558
+    // for the documentation about the tasks.json format
+    "version": "2.0.0",
+    "tasks": [{
+        "label": "build",
+        "type": "shell",
+        "command": "make",
+        "problemMatcher":[
+            "$gcc"
+        ]
+    },{
+        "label": "clean",
+        "type": "shell",
+        "command": "make",
+        "args": [ "clean" ],
+    },{
+        "label": "flash",
+        "type": "shell",
+        "command": "make",
+        "args": [ "flash" ],
+    }]
+}
\ No newline at end of file
diff --git a/software/nano-1284/test_2024-07-23/Makefile b/software/nano-1284/test_2024-07-23/Makefile
new file mode 100644 (file)
index 0000000..88e53cd
--- /dev/null
@@ -0,0 +1,124 @@
+.PHONY: all info flash picocom clean
+$(shell mkdir -p dist >/dev/null)
+$(shell mkdir -p build >/dev/null)
+$(shell mkdir -p sim >/dev/null)
+$(shell mkdir -p sim/build >/dev/null)
+
+NAME=test_2024-07-23_nano-1284p
+SRC= $(wildcard src/*.c src/*.cpp src/*/*.c src/*/*.cpp) 
+HDR= $(wildcard src/*.h src/*.hpp src/*/*.h src/*/*.hpp) 
+OBJ_CPP = $(SRC:src/%.cpp=build/%.o)
+OBJ = $(OBJ_CPP:src/%.c=build/%.o)
+OBJ_SIM_CPP = $(SRC:src/%.cpp=sim/build/%.o)
+OBJ_SIM = $(OBJ_SIM_CPP:src/%.c=sim/build/%.o)
+
+DEVICE=atmega1284p
+AVRDUDE_DEVICE=m1284p
+
+CC= avr-g++
+CFLAGS= -Wall -mmcu=$(DEVICE) -Os -DF_CPU=12000000 -c
+LFLAGS= -Wall -mmcu=$(DEVICE) -Os -DF_CPU=12000000 -Wl,-u,vfprintf -lprintf_flt -lm
+
+CFLAGS_SIM= -Wall -mmcu=$(DEVICE) -Og -DF_CPU=12000000 -g -c -c
+LFLAGS_SIM= -Wall -mmcu=$(DEVICE) -Og -DF_CPU=12000000 -g -Wl,-u,vfprintf -lprintf_flt -lm
+
+
+all: dist/$(NAME).elf dist/$(NAME).s dist/$(NAME).hex sim/$(NAME).elf sim/$(NAME).s info
+
+info:
+       @avr-size --mcu=$(DEVICE) --format=avr dist/$(NAME).elf
+
+.depend: $(SRC) $(HDR)
+       $(CC) -mmcu=$(DEVICE) -MM $(SRC) | sed --regexp-extended 's/^(.*\.o)\: src\/(.*)(\.cpp|\.c) (.*)/build\/\2\.o\: src\/\2\3 \4/g' > .depend
+
+-include .depend
+
+# .depend solte auch auf Header Files achten!
+
+dist/$(NAME).elf: .depend $(OBJ)
+       $(CC) $(LFLAGS) -o $@ $(OBJ)
+
+dist/%.s: dist/%.elf
+       avr-objdump -d $< > $@
+
+dist/%.hex: dist/%.elf
+       avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
+
+sim/$(NAME).elf: .depend $(OBJ_SIM)
+               $(CC) $(LFLAGS_SIM) -o $@ $(OBJ_SIM)
+
+# ensure that __DATE__ and __TIME__ macros are up to date
+build/main.o: src/main.cpp $(SRC) $(HDR)
+       @mkdir -p $(dir $@)
+       $(CC) $(CFLAGS) -o $@ $<
+
+build/%.o: src/%.c
+       @mkdir -p $(dir $@)
+       $(CC) $(CFLAGS) -o $@ $<
+
+build/%.o: src/%.cpp
+       @mkdir -p $(dir $@)
+       $(CC) $(CFLAGS) -o $@ $<
+
+sim/build/%.o: src/%.c
+       @mkdir -p $(dir $@)
+       $(CC) $(CFLAGS_SIM) -o $@ $<
+
+sim/build/%.o: src/%.cpp
+       @mkdir -p $(dir $@)
+       $(CC) $(CFLAGS_SIM) -o $@ $<
+
+sim/%.s: sim/%.elf
+       avr-objdump -d $< > $@
+
+simuc: sim/$(NAME).elf
+       simuc --board nano-1284 $<
+
+gdb: sim/$(NAME).elf
+       avr-gdb $<
+
+
+flash: dist/$(NAME).elf all
+       avrdude -c arduino -P /dev/ttyUSB0 -p $(AVRDUDE_DEVICE) -e -U flash:w:$<
+
+flash0: dist/$(NAME).elf all
+       avrdude -c arduino -P /dev/ttyUSB0 -p $(AVRDUDE_DEVICE) -e -U flash:w:$<
+
+flash1: dist/$(NAME).elf all
+       avrdude -c arduino -P /dev/ttyUSB1 -p $(AVRDUDE_DEVICE) -e -U flash:w:$<
+
+flash2: dist/$(NAME).elf all
+       avrdude -c arduino -P /dev/ttyUSB2 -p $(AVRDUDE_DEVICE) -e -U flash:w:$<
+
+picocom:
+       # picocom sends CR for ENTER -> convert cr (\r) to lf (\n)
+       picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB0
+
+picocom0:
+       picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB0
+
+picocom1:
+       picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB1
+
+picocom2:
+       picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB2
+
+
+isp-1284p:
+       avrdude -c usbasp -p $(AVRDUDE_DEVICE)
+
+isp-flash-1284p: dist/$(NAME).elf all
+       avrdude -c usbasp -p $(AVRDUDE_DEVICE) -e -U flash:w:$<
+
+flash-1284p: dist/$(NAME).elf all
+       avrdude -c arduino -p $(AVRDUDE_DEVICE) -P /dev/ttyUSB0 -b 115200 -e -U flash:w:$<
+
+isp-fuse-1284p:
+       avrdude -c usbasp -p $(AVRDUDE_DEVICE) -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xFF:m -U lock:w:0xFF:m
+
+clean:
+       @rm -r dist
+       @rm -r build
+       @rm -r sim
+       @find . -type f -name ".depend" -exec rm {} \;
+       @echo "clean done"
diff --git a/software/nano-1284/test_2024-07-23/README.md b/software/nano-1284/test_2024-07-23/README.md
new file mode 100644 (file)
index 0000000..65a0866
--- /dev/null
@@ -0,0 +1 @@
+# Testprogramm für Nano-1284
diff --git a/software/nano-1284/test_2024-07-23/src b/software/nano-1284/test_2024-07-23/src
new file mode 120000 (symlink)
index 0000000..38a7ae1
--- /dev/null
@@ -0,0 +1 @@
+../../nano-644/test_2024-07-23/src
\ No newline at end of file
index 9c1aefdf51649055404ab514a2f09bd7cb0ce198..dfbe39770bd9961653081db309aedaf8deee34cd 100644 (file)
 #include "units/rtc8563.hpp"
 #include "units/cc1101.hpp"
 
-
 const char MAIN_CPP_DATE[] PROGMEM = __DATE__;
 const char MAIN_CPP_TIME[] PROGMEM = __TIME__;
+#ifdef __AVR_ATmega328P__
+   const char MAIN_CPP_PART_NAME[] PROGMEM = "ATmega328P";
+#endif
+#ifdef __AVR_ATmega644P__
+   const char MAIN_CPP_PART_NAME[] PROGMEM = "ATmega644P";
+#endif
+#ifdef __AVR_ATmega1284P__
+   const char MAIN_CPP_PART_NAME[] PROGMEM = "ATmega1284P";
+#endif
+
+const char DIVIDER[] PROGMEM = "\n====================================\n ";
+const char LINEFEED[] PROGMEM = "\n";
 
 extern "C" {
    void __cxa_pure_virtual () {}
@@ -81,7 +92,7 @@ extern "C" {
    static FILE mystdout = { 0, 0, _FDEV_SETUP_WRITE , 0, 0, uart_putchar, NULL, 0 };
    static FILE mystdin  = { 0, 0, _FDEV_SETUP_READ  , 0, 0, NULL, uart_getchar, 0 };
 
-   #ifdef __AVR_ATmega644P__
+   #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
       static volatile uint16_t timerFlashGreenLed = 0;   
       static volatile uint16_t timerFlashRedLed = 0;
       void flashRedLed (uint16_t ms) { 
@@ -156,7 +167,7 @@ int waitAndReadKey (uint32_t ms) {
 
 int main () {
 
-   #ifdef __AVR_ATmega644P__
+   #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
    // Nano-644 LEDs (Green, Orange, Red)
    DDRC |= (1 << DDC4) | (1 << DDC3) | (1 << DDC2);
    PORTC &= ~((1 << PORT4) | (1 << PORT3) | (1 << PORT2));
@@ -188,7 +199,7 @@ int main () {
 
    sei();
 
-   #ifdef __AVR_ATmega644P__
+   #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
       TestUnit *unit[] = {
          &led, &sw, &rgb, &seg7, &poti, &encoder, &r2r, &motor, &portExp, &lcd, &uart1, &modbus, &ieee485,
          &i2cMaster, &i2cSlave, &i2cSparkfun, &rtc8563, &cc1101Send, &cc1101Receive
@@ -206,19 +217,19 @@ int main () {
       uint16_t i;
       char s[4];
       do {
-         printf_P(PSTR("\n"));
-         printf_P(PSTR("\n=================================\n"));
-         printf_P(PSTR("  Version: "));
+         printf_P(LINEFEED);
+         printf_P(DIVIDER);
+         printf_P(MAIN_CPP_PART_NAME); printf_P(PSTR(" / "));
          printf_P(MAIN_CPP_DATE); printf_P(PSTR(" / "));
          printf_P(MAIN_CPP_TIME);
-         printf_P(PSTR("\n=================================\n"));
-         printf_P(PSTR("\n"));
+         printf_P(DIVIDER);
+         printf_P(LINEFEED);
          printf_P(PSTR("Available units:\n\n"));
          for (i = 0; i < sizeof(unit) / sizeof(unit[0]); i++) {
             TestUnit *pu = unit[i];
             printf_P(PSTR("%3x ... "), i);
             printf_P(pu->getName());
-            printf_P(PSTR("\n"));
+            printf_P(LINEFEED);
          }
          printf_P(PSTR("\nSelect unit: "));
          rIndex = 0; wIndex = 0;
@@ -317,7 +328,7 @@ ISR (TIMER2_COMPA_vect) { // every 100us
       i2cSparkfun.tick1ms();
       cc1101Send.tick1ms();
       cc1101Receive.tick1ms();
-      #ifdef __AVR_ATmega644P__
+      #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
          if (timerFlashRedLed > 0) {
             if (--timerFlashRedLed < 128) {
                PORTC &= ~(1 << PC2); // red LED
@@ -333,7 +344,7 @@ ISR (TIMER2_COMPA_vect) { // every 100us
 
    timer500ms++;
    if (timer500ms >= 5000) {
-      #ifdef __AVR_ATmega644P__
+      #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
          PORTC ^= (1 << PC3); // orange LED blinking
       #endif
       #ifdef __AVR_ATmega328P__
index 11d75347a8a7b51b9bcef79226ce953355a186d0..b10f038219a344fa559338fc3b8247651fa749a8 100644 (file)
@@ -12,7 +12,7 @@ extern int wait (uint32_t ms);
 extern int waitAndReadKey (uint32_t ms);
 extern uint64_t millis ();
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
    extern "C" {
       extern void flashRedLed (uint16_t ms);
       extern void flashGreenLed (uint16_t ms);
index 25a11de88672abd6e3724b6520f7c364097c49ca..d53ecf2b37b6b017cbf71d00520b242d44f86827 100644 (file)
@@ -25,7 +25,7 @@
 #endif
 
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // --------------------------------------------------------
       PORTB &= ~(1 << PB0);
       DDRB |= ( 1 << PB0);
 
-      PRR &= (1 << PRSPI);
+      PRR0 &= (1 << PRSPI);
       
       // nCs
       PORTA |= (1 << PA4);
index 975f35810a13f3f2f2addd4d397207f292cdf4bb..7b33b76ba29ff4429d183428ae8dbac2eab2018b 100644 (file)
@@ -14,7 +14,7 @@
 // B --______-----  
 //                    one step when: A = 0, B= 0->1
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index 3d0bfca1d5d90ca9796236833156fede330c5817..8fcb67a4ea1714482cb3d6024aef4d8aac2ba864 100644 (file)
@@ -21,7 +21,7 @@ int8_t Ieee485::run (uint8_t subtest) {
 #endif
 
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
 // Nano-644
 // ------------------------------------
index 32188425137000ee0792c96f6598c7ee2dc1f284..86406900388c8de7c33a9b88c2869ca7d4ad566c 100644 (file)
@@ -5,7 +5,7 @@
 #include "lcd.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index c3175c172168c898568d1560e9f1df06ec0968a4..5a56665977d46f19a1ed2dd8037edf0cec5945b0 100644 (file)
@@ -5,7 +5,7 @@
 #include "led.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index 9faf8db6e6bd817406c8f13d8127623d249030c1..abbe36d4a29bfd7788117ace2fe45ba00effce26 100644 (file)
@@ -13,7 +13,7 @@ int8_t Modbus::run (uint8_t subtest) { return -1; }
 void Modbus::handleRxByte (uint8_t b) {}
 #endif
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
 // PB0 ... nRE .. Read enable
 // PB1 ...  DE .. Data enable
index eac61bba60b62dcf39eea1e1517ddf4a532e881f..4457c1a393142944197aba94d0d14bf0264b87ac 100644 (file)
@@ -5,7 +5,7 @@
 #include "motor.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index 409d1f873f6816825127b48376ae5eb68c9eb8b8..7eac74d0dadd793ae5be13a2c92193e2af7cddf7 100644 (file)
@@ -19,7 +19,7 @@
 //     GPA6 |   IO16O1 (PA1)  | L-Gelb      |   |     GPB6 |   IO16U1 (PC1)  | O-Gelb      |
 //     GPA7 |   IO16O0 (PA0)  | L-Rot       |   |     GPB7 |   IO16U0 (PC0)  | O-Rot       |
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // --------------------------------------------------------
@@ -29,7 +29,7 @@
    // PB7 ... SCK
 
    void PortExp::init () {
-      PRR &= (1 << PRSPI);
+      PRR0 &= (1 << PRSPI);
       PORTA |= (1 << PA7);
       DDRA |= (1 << PA7); // SPI nCS
       // PORTB/DDRB must be configured before SPCR !!
index ef299cefe3970a2000064461554c3b732bbbd2b8..87fb822b20264a3cf336ad78d446a85dde51d5b1 100644 (file)
@@ -4,7 +4,7 @@
 #include "r2r.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
    // AVCC=3.3, POTI Vmax=3.3V
    #define K 1.0
 #endif
index c8d32c5cc7f5f277e438043c2846ec35c6d1d67b..3f69cbd43d1adec9db43f4ef43da4f0dad13ed34 100644 (file)
@@ -4,7 +4,7 @@
 #include "rgb.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index 6baab35720ba421c218508408cfbda26aea81ed2..9d262656f74633700ba5542b8e76a2bac1af10a2 100644 (file)
@@ -20,7 +20,7 @@ void Rtc8563::cleanup () {}
 int8_t Rtc8563::run (uint8_t subtest) { return -1; }
 #endif
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
 void Rtc8563::init () {
    PORTC |= (1 << PC7); // nInt
index d7d8c0580c82f396933f73014ce5551bbf577a0a..208107bcc0b74d96104a5699ca393cc66522d559 100644 (file)
@@ -4,7 +4,7 @@
 #include "seg7.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index 45866a4f3603f24d92a21ca6bdb3c451ecda68b9..4ce9456f7c0a82e26d543cae57217264b2e1ff86 100644 (file)
@@ -5,7 +5,7 @@
 #include "switch.hpp"
 #include "../main.hpp"
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
    // Nano-644
    // ---------------------------------------------------------------
index d81364800c0d3bfb2952168a5f5aada68073f84c..57e0bfb06ff6a8a5e425a5197e74143fe173b0b2 100644 (file)
@@ -12,7 +12,7 @@
    void Uart1::handleRxByte (uint8_t b) {}
 #endif
 
-#ifdef __AVR_ATmega644P__
+#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
 
 int uart1_putchar(char c, FILE *stream) {
    if (c == '\n') {