diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-10-04 00:36:34 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-10-04 00:36:38 -0600 |
| commit | b3555efa723d0b7101ea6989dc04492eca6b8745 (patch) | |
| tree | 65217cf306fe30225cbd88653bdec96ef9275513 /demo/main.c | |
| parent | 3de42a19661a3d6d24de46ca2920b06e1dc88fe0 (diff) | |
demo: implement cli input
Diffstat (limited to 'demo/main.c')
| -rw-r--r-- | demo/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/demo/main.c b/demo/main.c index b984d6f..f75f6f1 100644 --- a/demo/main.c +++ b/demo/main.c @@ -12,6 +12,16 @@ void bsp_main(void) print("booted %u cpus", NUM_CPUS); while (1) { + char input[64]; + read_line(input, sizeof input); + + char *tokens = input; + + char *cmd = strtok_input(&tokens); + if (!cmd) + continue; + + print("unknown command '%s'", cmd); } } |
