2026-07-02 15:40:39 +08:00
|
|
|
#ifndef UTSM_LOG_H
|
|
|
|
|
#define UTSM_LOG_H
|
|
|
|
|
|
|
|
|
|
#include <utsm/types.h>
|
|
|
|
|
|
|
|
|
|
void serial_init(void);
|
|
|
|
|
void serial_putc(char c);
|
|
|
|
|
void serial_write(const char *s);
|
|
|
|
|
|
|
|
|
|
void log_info(const char *msg);
|
|
|
|
|
void log_warn(const char *msg);
|
|
|
|
|
void log_error(const char *msg);
|
|
|
|
|
void log_hex64(const char *prefix, u64 value);
|
|
|
|
|
void panic(const char *msg);
|
|
|
|
|
|
2026-08-09 22:14:01 +08:00
|
|
|
/* ---- 内存日志缓冲区(实机启动日志持久化) ---- */
|
|
|
|
|
void log_capture_enable(int enable);
|
|
|
|
|
const char *log_get_buffer(void);
|
|
|
|
|
u32 log_get_length(void);
|
|
|
|
|
|
2026-07-02 15:40:39 +08:00
|
|
|
#endif
|