Lines Matching refs:inbuf

37     char inbuf[REPL_INBUF_SIZE];  member
52 static int32_t repl_getchar(char *inbuf) in repl_getchar() argument
57 ret = aos_hal_uart_recv_II(&g_repl_uart, inbuf, 1, &recv_size, AOS_WAIT_FOREVER); in repl_getchar()
182 static void repl_handle_input(void *inbuf) in repl_handle_input() argument
188 duk_push_pointer(ctx, inbuf); in repl_handle_input()
189 duk_push_uint(ctx, (duk_uint_t)strlen((char *)inbuf)); in repl_handle_input()
214 char *inbuf = g_repl->inbuf; in repl_history_input() local
215 int32_t charnum = strlen(g_repl->inbuf) + 1; in repl_history_input()
228 strncpy(&(g_repl->history[his_cur]), inbuf, charnum); in repl_history_input()
235 strncpy(&(g_repl->history[his_cur]), inbuf, left_num); in repl_history_input()
236 strncpy(&(g_repl->history[0]), inbuf + left_num, charnum - left_num); in repl_history_input()
328 static int32_t repl_get_input(char *inbuf, uint32_t *bp) in repl_get_input() argument
336 if (inbuf == NULL) in repl_get_input()
346 inbuf[*bp] = '\0'; in repl_get_input()
381 inbuf[*bp] = 0x1b; in repl_get_input()
384 inbuf[*bp] = key1; in repl_get_input()
415 inbuf[*bp] = 0x1b; in repl_get_input()
418 inbuf[*bp] = key1; in repl_get_input()
421 inbuf[*bp] = key2; in repl_get_input()
438 while(backspace && inbuf[backspace--]){ in repl_get_input()
445 repl_up_history(inbuf); in repl_get_input()
449 repl_down_history(inbuf); in repl_get_input()
452 *bp = strlen(inbuf); in repl_get_input()
457 repl_printf("\r" REPL_PROMPT "%s", inbuf); in repl_get_input()
488 inbuf[*bp] = c; in repl_get_input()
568 if (repl_get_input(g_repl->inbuf, &g_repl->bp) != 0) in repl_main()
570 if (strcmp(g_repl->inbuf, "exit") == 0) { in repl_main()
573 if (strlen(g_repl->inbuf) > 0) in repl_main()
576 amp_task_schedule_call(repl_handle_input, g_repl->inbuf); in repl_main()