#include #include /* strlen */ #include #include #include #include #include #include void handle_command(char const d[]) { if (!strcmp(d, "ts") || !strcmp(d, "time")) { printf("the tick count since boot is: %u\n", xTaskGetTickCount()); } else if (!strcmp(d, "help")) { printf("commands include ts, time\n"); } else { printf("command not recognized, try help\n"); } } void user_init(void) { uart_set_baud(0, 115200); printf("\n\nWelcome to the uart REPL demo. try \"help\"\n"); uart_repl_init(&handle_command); }