summaryrefslogtreecommitdiff
path: root/avr/main.c
diff options
context:
space:
mode:
authorLeo C2014-08-24 23:22:58 +0200
committerLeo C2014-08-24 23:22:58 +0200
commitf14850dbf6369dc42df913c407bda51efb1c620c (patch)
treeac6a860b10132e7b48234834d7d48b39a2994ae3 /avr/main.c
parent35e9ec0c03a150e3fe6a3350549573e4c02be67b (diff)
downloadz180-stamp-f14850dbf6369dc42df913c407bda51efb1c620c.zip
use env var 'baudrate'
Diffstat (limited to 'avr/main.c')
-rw-r--r--avr/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/avr/main.c b/avr/main.c
index fb4e35c..dc7a6ef 100644
--- a/avr/main.c
+++ b/avr/main.c
@@ -203,10 +203,12 @@ int main(void)
setup_avr();
z80_setup_bus();
+ env_init();
+
if (reset_reason_is_power_on())
- _delay_ms(CONFIG_POWRON_DELAY);
+ _delay_ms(CONFIG_PWRON_DELAY);
- serial_setup();
+ serial_setup(getenv_ulong("baudrate", 10, CONFIG_BAUDRATE));
sei();
#if DEBUG
@@ -214,8 +216,6 @@ int main(void)
print_reset_reason();
#endif
- env_init();
-
#if DEBUG
unsigned long i_speed = getenv_ulong("i2c_clock", 10, CONFIG_SYS_I2C_CLOCK);
debug("### Setting I2C clock Frequency to %lu Hz.\n", i_speed);