diff options
author | Leo C | 2014-08-21 00:48:46 +0200 |
---|---|---|
committer | Leo C | 2014-08-21 00:48:46 +0200 |
commit | 69988dc1f60ce27d2192eb2aa579962f585fffc8 (patch) | |
tree | c0dd96fc58aebe4090d58bcba80efac1f7d7b91e /avr/main.c | |
parent | d0581f881c4072ef0ac453167a98dc3bc0d87d86 (diff) | |
download | z180-stamp-69988dc1f60ce27d2192eb2aa579962f585fffc8.zip |
printf() --> printf_P(PSTR())
Diffstat (limited to 'avr/main.c')
-rw-r--r-- | avr/main.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -28,6 +28,18 @@ #include "env.h" /*--------------------------------------------------------------------------*/ +#if DEBUG +void preset_ram (void) __attribute__ ((naked)) \ + __attribute__ ((section (".init3"))); +void +preset_ram (void) +{ + for (uint8_t *p = RAMSTART; p <= (uint8_t *) RAMEND; p++) + *p = 0xdd; + +} +#endif +/*--------------------------------------------------------------------------*/ static uint8_t mcusr; @@ -93,7 +105,6 @@ void print_reset_reason(void) /*******************************************************************************/ -/*******************************************************************************/ #define udelay(n) _delay_us(n) @@ -193,14 +204,15 @@ void main_loop(void) int main(void) { + setup_avr(); z80_setup_bus(); serial_setup(); sei(); - debug("\n=========================< (RE)START DEBUG >=========================\n"); #if DEBUG + debug("\n=========================< (RE)START DEBUG >=========================\n"); print_reset_reason(); #endif |