26 fprintf(c->
out,
"Usage: add <x> <y>\n");
28 fprintf(c->
out,
"%ld\n", strtol(c->
argv[1], NULL, 0) +
29 strtol(c->
argv[2], NULL, 0));
46 fprintf(c->
out,
"Usage: udelay <time>\n");
53 uint32_t delay = strtol(c->
argv[1], NULL, 0);
60 fprintf(c->
out,
"udelay completed after %uus\n",
77 fprintf(c->
out,
"Usage: usleep <time>\n");
84 uint32_t delay = strtol(c->
argv[1], NULL, 0);
90 fprintf(c->
out,
"usleep completed after %uus\n",
98 int main(
int argc,
char *argv[])
uint32_t u32[SCRATCH_SIZE/4]
void fibre_scheduler_main_loop(void)
#define CONSOLE_CMD_VAR_INIT(n, f)
int32_t cyclecmp32(uint32_t a, uint32_t b)
Compares values that may be subject to overflow.
int main(int argc, char *argv[])
union console::@0 scratch
Console command descriptor.
int console_register(const console_cmd_t *cmd)
Register a new command.
bool fibre_timeout(uint32_t duetime)
void console_init(console_t *c, FILE *f)
Initialized the console handler.