| 108 | } |
| 109 | |
| 110 | static void wrap_putchar(unsigned char byte, void *data) |
| 111 | { |
| 112 | union log_state state = { .as_ptr = data }; |
| 113 | static bool line_started = false; |
| 114 | |
| 115 | if (byte == '\n') { |
| 116 | line_end(state); |
| 117 | line_started = false; |
| 118 | } else if (!line_started) { |
| 119 | line_start(state); |
| 120 | line_started = true; |
| 121 | } |
| 122 | |
| 123 | if (LOG_FAST(state)) |
| 124 | __cbmemc_tx_byte(byte); |
| 125 | else |
| 126 | console_tx_byte(byte); |
| 127 | } |
| 128 | |
| 129 | int vprintk(int msg_level, const char *fmt, va_list args) |
| 130 | { |
nothing calls this directly
no test coverage detected