static void nand_reset(void) { NAND_COMMAND = NAND_CMD_RESET; system_delay(10000); return; }
/* * Attempts get a command from the user and execute it. * Returns 1 (true) on successful execution of a function * from the command table and 0 (false) otherwise. */ int console_go(void)//bool { /* * Reinitialize console string. */ unsigned int i = 0; for (i = 0; i < INPUT_LENGTH; i++) { console_input[i] = 0; } uart_get_console_input(console_input, INPUT_LENGTH); uart_write("You just typed: "); uart_write(console_input); uart_write("\n"); system_delay(500);//give time for the uart to output int worked = execute_command(console_input); return worked; }