[api] remove UART from in cli/ncp API (#6243)

This commit removes application library CLI/NCP dependency on platform
layer UART APIs. Instead, application layer provides callbacks sending
CLI/NCP data.

With this change, platforms with native support for formatted output
can simply implement the CLI output callback with something like
`vprintf()`.
This commit is contained in:
Yakun Xu
2021-03-19 13:13:05 +08:00
committed by GitHub
parent 3d10c90da4
commit db1b980e57
113 changed files with 1227 additions and 1473 deletions
@@ -46,13 +46,13 @@ There are two alarm service types,
and [microsecond](https://github.com/openthread/openthread/blob/main/include/openthread/platform/alarm-micro.h).
Millisecond is required for a new hardware platform. Microsecond is optional.
## Step 2: UART
## Step 2: UART
> Note: This API is optional.
API declaration:
[`/openthread/include/openthread/platform/uart.h`](https://github.com/openthread/openthread/blob/main/include/openthread/platform/uart.h)
[`/openthread/examples/platforms/utils/uart.h`](https://github.com/openthread/openthread/blob/main/examples/platforms/utils/uart.h)
The UART API implements fundamental serial port communication via the UART
interface.