UART

This module includes the platform abstraction for UART communication.

Summary

Functions

otPlatUartDisable(void)
Disable the UART.
otPlatUartEnable(void)
Enable the UART.
otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
void
The UART driver calls this method to notify OpenThread that bytes have been received.
otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength)
Send bytes over the UART.
otPlatUartSendDone(void)
void
The UART driver calls this method to notify OpenThread that the requested bytes have been sent.

Functions

otPlatUartDisable

otError otPlatUartDisable(
  void
)

Disable the UART.

Details
Return Values
OT_ERROR_NONE
Successfully disabled the UART.
OT_ERROR_FAILED
Failed to disable the UART.

otPlatUartEnable

otError otPlatUartEnable(
  void
)

Enable the UART.

Details
Return Values
OT_ERROR_NONE
Successfully enabled the UART.
OT_ERROR_FAILED
Failed to enabled the UART.

otPlatUartReceived

void otPlatUartReceived(
  const uint8_t *aBuf,
  uint16_t aBufLength
)

The UART driver calls this method to notify OpenThread that bytes have been received.

Details
Parameters
[in] aBuf
A pointer to the received bytes.
[in] aBufLength
The number of bytes received.

otPlatUartSend

otError otPlatUartSend(
  const uint8_t *aBuf,
  uint16_t aBufLength
)

Send bytes over the UART.

Details
Parameters
[in] aBuf
A pointer to the data buffer.
[in] aBufLength
Number of bytes to transmit.
Return Values
OT_ERROR_NONE
Successfully started transmission.
OT_ERROR_FAILED
Failed to start the transmission.

otPlatUartSendDone

void otPlatUartSendDone(
  void
)

The UART driver calls this method to notify OpenThread that the requested bytes have been sent.