refactor: 完成R8裸机lwIP移植并更新文档

This commit is contained in:
2026-03-30 18:08:54 +08:00
parent 68c64959c7
commit 9efa2cdc59
24 changed files with 1845 additions and 3619 deletions
+30
View File
@@ -0,0 +1,30 @@
#include "SEGGER_RTT.h"
#include <stdarg.h>
#include <stdio.h>
int SEGGER_RTT_vprintf(unsigned BufferIndex, const char *sFormat, va_list *pParamList)
{
char buffer[SEGGER_RTT_PRINTF_BUFFER_SIZE];
int len = vsnprintf(buffer, sizeof(buffer), sFormat, *pParamList);
if (len < 0) {
return len;
}
if ((unsigned)len > sizeof(buffer)) {
len = (int)sizeof(buffer);
}
return (int)SEGGER_RTT_Write(BufferIndex, buffer, (unsigned)len);
}
int SEGGER_RTT_printf(unsigned BufferIndex, const char *sFormat, ...)
{
int result;
va_list args;
va_start(args, sFormat);
result = SEGGER_RTT_vprintf(BufferIndex, sFormat, &args);
va_end(args);
return result;
}