]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/main.c
Init ports for single step logic on ECB adapter. Use timer 5 instead of timer 4 for...
[z180-stamp.git] / avr / main.c
index 113b4f24310f2cea292503f9e274d7b6fbdba42a..2199454fa0bd9654ea83804c2ebf051594a59d4b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
  *
- * SPDX-License-Identifier:    GPL-2.0+
+ * SPDX-License-Identifier:    GPL-2.0
  */
 
 
@@ -9,7 +9,6 @@
 #include <avr/interrupt.h>
 #include <avr/wdt.h>
 #include <stdlib.h>
-#include <stdio.h>
 
 #include "config.h"
 #include "ff.h"
@@ -232,7 +231,7 @@ const char *bootdelay_process(void)
 static
 void autoboot_command(const char *s)
 {
-       debug("### main_loop: bootcmd=\"%s\"\n", s ? s : PSTR("<UNDEFINED>"));
+       debug("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>");
        _delay_ms(20);
 
        if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) {
@@ -255,12 +254,12 @@ int main(void)
 {
        extern void setup_mmc(void);
 
+       setup_avr();
        for (int i = 0; i < GPIO_MAX; i++)
                gpio_config(i, INPUT_PULLUP);
-       setup_avr();
        setup_mmc();
-       z80_setup_bus();
        env_init();
+       z80_setup_bus();
 
        if (reset_reason_is_power_on())
                _delay_ms(CONFIG_PWRON_DELAY);