Lines Matching full:byte
94 * function MUST return the byte output. in console_out()
240 static void handle_ansi(uint8_t byte, char *line) in handle_ansi() argument
243 if (isdigit(byte) == 0) { in handle_ansi()
249 ansi_val = byte - '0'; in handle_ansi()
255 if (isdigit(byte) != 0) { in handle_ansi()
258 ansi_val_2 += byte - '0'; in handle_ansi()
261 ansi_val += byte - '0'; in handle_ansi()
267 if (byte == ';' && in handle_ansi()
277 switch (byte) { in handle_ansi()
346 static int read_mcumgr_byte(uint8_t byte) in read_mcumgr_byte() argument
364 if (byte == MCUMGR_SERIAL_HDR_PKT_2) { in read_mcumgr_byte()
365 /* Final framing byte received. */ in read_mcumgr_byte()
370 if (byte == MCUMGR_SERIAL_HDR_FRAG_2) { in read_mcumgr_byte()
371 /* Final framing byte received. */ in read_mcumgr_byte()
376 if (byte == MCUMGR_SERIAL_HDR_PKT_1) { in read_mcumgr_byte()
377 /* First framing byte received. */ in read_mcumgr_byte()
380 } else if (byte == MCUMGR_SERIAL_HDR_FRAG_1) { in read_mcumgr_byte()
381 /* First framing byte received. */ in read_mcumgr_byte()
387 /* Non-mcumgr byte received. */ in read_mcumgr_byte()
392 * @brief Attempts to process a received byte as part of an mcumgr frame.
395 * @param byte The byte just received.
400 static bool handle_mcumgr(struct console_input *cmd, uint8_t byte) in handle_mcumgr() argument
404 mcumgr_state = read_mcumgr_byte(byte); in handle_mcumgr()
407 * process the byte. in handle_mcumgr()
413 /* The received byte is part of an mcumgr command. Process the byte in handle_mcumgr()
418 cmd->line[cur++] = byte; in handle_mcumgr()
420 if (mcumgr_state == CONSOLE_MCUMGR_STATE_PAYLOAD && byte == '\n') { in handle_mcumgr()
445 uint8_t byte; in uart_console_isr() local
459 rx = read_uart(uart_console_dev, &byte, 1); in uart_console_isr()
465 if (debug_hook_in != NULL && debug_hook_in(byte) != 0) { in uart_console_isr()
482 /* Divert this byte from normal console handling if it is part in uart_console_isr()
485 if (handle_mcumgr(cmd, byte)) { in uart_console_isr()
492 handle_ansi(byte, cmd->line); in uart_console_isr()
498 if (byte == ANSI_ESC) { in uart_console_isr()
507 if (isprint(byte) == 0) { in uart_console_isr()
508 switch (byte) { in uart_console_isr()
543 insert_char(&cmd->line[cur++], byte, end); in uart_console_isr()
546 last_char = byte; in uart_console_isr()