[gn] add cli_uart (#12345)

This commit adds the `cli_uart` for applications to integrate OpenThread
CLI based on UART APIs. One of the example is OTNS.
This commit is contained in:
Yakun Xu
2026-02-02 17:30:38 -08:00
committed by Jonathan Hui
parent b8f5a6f2b6
commit e5d2c5860e
3 changed files with 49 additions and 9 deletions
+3 -2
View File
@@ -29,9 +29,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <openthread-system.h>
#include <openthread/cli.h>
#include <openthread/logging.h>
#include <openthread/platform/debug_uart.h>
@@ -291,6 +289,9 @@ static int Output(const char *aBuf, uint16_t aBufLength)
return sent;
}
static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments)
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 0);
static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments)
{
OT_UNUSED_VARIABLE(aContext);