コード例 #1
0
ファイル: uart.c プロジェクト: abtink/openthread
static void processTransmit(void)
{
    if (sTransmitDone)
    {
        sTransmitDone = false;
        otPlatUartSendDone();
    }
}
コード例 #2
0
ファイル: uart.c プロジェクト: nodish/openthread
/**
 * Function for notifying application about transmission being done.
 */
static void processTransmit(void)
{
    otEXPECT(sTransmitBuffer != NULL);

    if (sTransmitDone)
    {
        // Clear Transmition transaction and notify application.
        sTransmitBuffer = NULL;
        sTransmitLength = 0;
        sTransmitDone   = false;
        otPlatUartSendDone();
    }

exit:
    return;
}
コード例 #3
0
ファイル: uart.c プロジェクト: abtink/openthread
/**
 * @brief process the transmit side of the buffers
 */
static void processTransmit(void)
{
    otEXPECT(sSendBuffer != NULL);

    for (; sSendLen > 0; sSendLen--)
    {
        UARTCharPut(UART0_BASE, *sSendBuffer);
        sSendBuffer++;
    }

    sSendBuffer = NULL;
    sSendLen    = 0;
    otPlatUartSendDone();

exit:
    return;
}
コード例 #4
0
ファイル: usb-cdc-uart.c プロジェクト: pvanhorn/openthread
static void processTransmit(void)
{
    // If some data was requested to send while port was closed, send it now.
    if ((sUsbState.mTxBuffer != NULL) && isPortOpened())
    {
        if (app_usbd_cdc_acm_write(&sAppCdcAcm, sUsbState.mTxBuffer, sUsbState.mTxSize) == NRF_SUCCESS)
        {
            sUsbState.mTransferInProgress = true;
            sUsbState.mTxBuffer           = NULL;
            sUsbState.mTxSize             = 0;
        }
    }
    else if (sUsbState.mTransferDone)
    {
        otPlatLog(OT_LOG_LEVEL_DEBG, OT_LOG_REGION_PLATFORM, "otPlatUartSendDone");

        sUsbState.mTransferDone       = false;
        sUsbState.mTransferInProgress = false;

        otPlatUartSendDone();
    }
}