*/
#include "common.h"
#include <stdlib.h>
-#include <util/delay.h>
#include <avr/pgmspace.h>
#include "command.h"
#include "z80-if.h"
+//#include "debug.h"
/* ugly hack to get Z180 loadfile into flash memory */
#define const const FLASH
z80_bus_cmd(Request);
z80_write_block((const FLASH unsigned char *) &hdrom[sec_base], /* src */
- hdrom_address[sec], /* dest */
+ hdrom_address[sec], /* dest */
hdrom_length_of_sections[sec]); /* len */
z80_bus_cmd(Release);
sec_base+=hdrom_length_of_sections[sec];
return CMD_RET_SUCCESS;
}
-
-command_ret_t do_clock(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
-{
- uint32_t freq;
-
- (void) cmdtp; (void) flag;
-
- if (argc == 2) {
- freq = strtoul(argv[1], NULL, 10);
- if (freq == 0) {
- printf_P(PSTR("CPU clock cannot be 0\n"));
- return CMD_RET_USAGE;
- }
-
- if (freq > F_CPU / 2) {
- printf_P(PSTR("Max CPU clock freq. is: %luHz\n"), F_CPU/2);
- return CMD_RET_USAGE;
- }
-
- if (z80_clock_set(freq) < 0) {
- printf_P(PSTR("Setting CPU clock freq. to %luHz failed.\n"),
- freq);
- }
- }
-
- printf_P(PSTR("CPU clock: %luHz\n"), z80_clock_get());
-
-
- return CMD_RET_SUCCESS;
-}
-