X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/6dbf5891f52b1e06f8448e2b0526214bc882c6ec..HEAD:/avr/cmd_cpu.c?ds=sidebyside diff --git a/avr/cmd_cpu.c b/avr/cmd_cpu.c index 2abf5db..af9ded4 100644 --- a/avr/cmd_cpu.c +++ b/avr/cmd_cpu.c @@ -25,21 +25,6 @@ #define debug_cpu(fmt, args...) \ debug_cond(DEBUG_CPU, fmt, ##args) -static -char * ulltoa (uint64_t val, char *s) -{ - char *p = s; - - while (val >= 10) { - *p++ = (val % 10) + '0'; - val = val / 10; - } - *p++ = val + '0'; - *p = '\0'; - - return strrev(s); -} - /* * delay for ms... */ @@ -50,88 +35,6 @@ static void test_delay(uint32_t count) while (get_timer(ts) <= count); } -static uint32_t z80_measure_phi(uint_fast8_t cycles) -{ - uint16_t ref_stop; - uint16_t ref_ovfl; - uint8_t x_ovfl; - uint32_t x_freq; - - - PRR1 &= ~_BV(PRTIM3); - TCCR3A = 0; - TCCR3B = 0b000< 0 || x_tmp >= 100000; sc--) x_tmp = (x_tmp + 5)/10; - x_freq = x_tmp; - for ( ; sc < 0; sc++) x_freq *= 10; - - return x_freq; -} - static const FLASH char * const FLASH cpu_strings[] = { FSTR("Unknown"), FSTR("8080"), @@ -425,7 +328,7 @@ CMD_TBL_ITEM( // "[-swnu] [-c loopcycles] [-t timeout]\n" "[-swnu] [-c loopcycles]\n" " -s Be silent\n" - " -w Write result to environment variable '"ENV_CPU_FREQ"'" + " -w Write result to environment variable '"ENV_CPU_FREQ"'\n" " -n Don't load code snippet. \n" " -u Don't unload. Leave code snippet in ram.\n" " -c Overwrite cycles per lopp for in \"l: a,(50h)/jp l\" loop." @@ -437,7 +340,7 @@ CMD_TBL_ITEM( // "[-swnu] [-c loopcycles] [-t timeout]\n" "[-swnu] [-c loopcycles]\n" " -s Be silent\n" - " -w Write result to environment variable '"ENV_CPU"'" + " -w Write result to environment variable '"ENV_CPU"'\n" " -n Don't load code snippet. \n" " -u Don't unload. Leave code snippet in ram." // " -t Timeout (ms)\n"