![]() |
![]() |
TI-OpenThread
1.08.03.09
|
#include <openthread/config.h>
#include <stddef.h>
#include <utils/code_utils.h>
#include <openthread/platform/uart.h>
#include <ti/drivers/UART.h>
#include <ti/drivers/uart/UARTCC26XX.h>
#include "ti_drivers_config.h"
#include "system.h"
Macros | |
#define | PLATFORM_UART_EVENT_RX_DONE (1U << 1) |
#define | PLATFORM_UART_EVENT_TX_DONE (1U << 0) |
#define | PLATFORM_UART_RECV_BUF_LEN 32 |
Functions | |
otError | otPlatUartDisable (void) |
otError | otPlatUartEnable (void) |
otError | otPlatUartFlush (void) |
otError | otPlatUartSend (const uint8_t *aBuf, uint16_t aBufLength) |
void | platformUartProcess (uintptr_t arg) |
static void | uartReadCallback (UART_Handle aHandle, void *aBuf, size_t aLen) |
static void | uartWriteCallback (UART_Handle aHandle, void *aBuf, size_t aLen) |
Variables | |
static uint8_t | PlatformUart_receiveBuffer [PLATFORM_UART_RECV_BUF_LEN] |
static size_t | PlatformUart_receiveLen |
static uint8_t const * | PlatformUart_sendBuffer = NULL |
static UART_Handle | PlatformUart_uartHandle |
#define PLATFORM_UART_EVENT_TX_DONE (1U << 0) |
Configure the UART core for 115200 baud 8-N-1, no HW flow control.
Referenced by platformUartProcess(), and uartWriteCallback().
#define PLATFORM_UART_EVENT_RX_DONE (1U << 1) |
Referenced by platformUartProcess(), and uartReadCallback().
#define PLATFORM_UART_RECV_BUF_LEN 32 |
Size of the statically allocated buffer to pass data from the callback to the processing loop.
|
static |
Callback for when the UART driver finishes reading.
This is triggered when the buffer is full, or when the UART hardware times out.
References PLATFORM_UART_EVENT_RX_DONE, PlatformUart_receiveLen, and platformUartSignal().
Referenced by otPlatUartEnable().
|
static |
Callback for when the UART driver finishes writing a buffer.
References PLATFORM_UART_EVENT_TX_DONE, PlatformUart_sendBuffer, and platformUartSignal().
Referenced by otPlatUartEnable().
otError otPlatUartEnable | ( | void | ) |
Function documented in platform/uart.h
References PlatformUart_receiveBuffer, PlatformUart_uartHandle, uartReadCallback(), and uartWriteCallback().
otError otPlatUartDisable | ( | void | ) |
Function documented in platform/uart.h
References PlatformUart_uartHandle.
otError otPlatUartSend | ( | const uint8_t * | aBuf, |
uint16_t | aBufLength | ||
) |
Function documented in platform/uart.h
References PlatformUart_sendBuffer, and PlatformUart_uartHandle.
void platformUartProcess | ( | uintptr_t | arg | ) |
Function documented in system.h
References otPlatUartFlush(), otPlatUartReceived(), otPlatUartSendDone(), PLATFORM_UART_EVENT_RX_DONE, PLATFORM_UART_EVENT_TX_DONE, PlatformUart_receiveBuffer, PlatformUart_receiveLen, and PlatformUart_uartHandle.
otError otPlatUartFlush | ( | void | ) |
Function documented in system.h
Referenced by platformUartProcess().
|
static |
Statically allocated data buffer.
Referenced by otPlatUartEnable(), and platformUartProcess().
|
static |
Number of bytes in the receive buffer.
Referenced by platformUartProcess(), and uartReadCallback().
|
static |
The buffer to be sent.
Referenced by otPlatUartSend(), and uartWriteCallback().
|
static |
Uart driver handle.
Referenced by otPlatUartDisable(), otPlatUartEnable(), otPlatUartSend(), and platformUartProcess().