当前位置: 首页>>代码示例>>C++>>正文


C++ OT_UNUSED_VARIABLE函数代码示例

本文整理汇总了C++中OT_UNUSED_VARIABLE函数的典型用法代码示例。如果您正苦于以下问题:C++ OT_UNUSED_VARIABLE函数的具体用法?C++ OT_UNUSED_VARIABLE怎么用?C++ OT_UNUSED_VARIABLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OT_UNUSED_VARIABLE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: otPlatAlarmMilliStartAt

/**
 * Function documented in platform/alarm-milli.h
 */
void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
{
    OT_UNUSED_VARIABLE(aInstance);

    sTime0     = aT0;
    sAlarmTime = aDt;
    sIsRunning = true;
}
开发者ID:abtink,项目名称:openthread,代码行数:11,代码来源:alarm.c

示例2: otPlatSettingsGet

otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength)
{
    OT_UNUSED_VARIABLE(aInstance);

    otError  error       = OT_ERROR_NOT_FOUND;
    uint32_t address     = sSettingsBaseAddress + OT_SETTINGS_FLAG_SIZE;
    uint16_t valueLength = 0;
    int      index       = 0;

    while (address < (sSettingsBaseAddress + sSettingsUsedSize))
    {
        struct settingsBlock block;

        utilsFlashRead(address, (uint8_t *)(&block), sizeof(block));

        if (block.key == aKey)
        {
            if (!(block.flag & OT_FLASH_BLOCK_INDEX_0_FLAG))
            {
                index = 0;
            }

            if (!(block.flag & OT_FLASH_BLOCK_ADD_COMPLETE_FLAG) && (block.flag & OT_FLASH_BLOCK_DELETE_FLAG))
            {
                if (index == aIndex)
                {
                    uint16_t readLength = block.length;

                    // only perform read if an input buffer was passed in
                    if (aValue != NULL && aValueLength != NULL)
                    {
                        // adjust read length if input buffer length is smaller
                        if (readLength > *aValueLength)
                        {
                            readLength = *aValueLength;
                        }

                        utilsFlashRead(address + sizeof(struct settingsBlock), aValue, readLength);
                    }

                    valueLength = block.length;
                    error       = OT_ERROR_NONE;
                }

                index++;
            }
        }

        address += (getAlignLength(block.length) + sizeof(struct settingsBlock));
    }

    if (aValueLength != NULL)
    {
        *aValueLength = valueLength;
    }

    return error;
}
开发者ID:abtink,项目名称:openthread,代码行数:58,代码来源:settings_flash.c

示例3: otPlatRadioSetTransmitPower

otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
{
    OT_UNUSED_VARIABLE(aInstance);

    sDefaultTxPower = aPower;
    nrf_802154_tx_power_set(aPower);

    return OT_ERROR_NONE;
}
开发者ID:spark,项目名称:firmware,代码行数:9,代码来源:radio.c

示例4: otPlatRadioSetPanId

void otPlatRadioSetPanId(otInstance *aInstance, uint16_t aPanId)
{
    OT_UNUSED_VARIABLE(aInstance);

    uint8_t address[SHORT_ADDRESS_SIZE];
    convertShortAddress(address, aPanId);

    nrf_802154_pan_id_set(address);
}
开发者ID:spark,项目名称:firmware,代码行数:9,代码来源:radio.c

示例5: otPlatRadioGetIeeeEui64

void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
{
    OT_UNUSED_VARIABLE(aInstance);

    uint64_t factoryAddress = (uint64_t)NRF_FICR->DEVICEID[0] << 32;
    factoryAddress |= NRF_FICR->DEVICEID[1];

    memcpy(aIeeeEui64, &factoryAddress, sizeof(factoryAddress));
}
开发者ID:spark,项目名称:firmware,代码行数:9,代码来源:radio.c

示例6: otPlatRadioSetShortAddress

void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddress)
{
    OT_UNUSED_VARIABLE(aInstance);

    uint8_t address[SHORT_ADDRESS_SIZE];
    convertShortAddress(address, aShortAddress);

    nrf_802154_short_address_set(address);
}
开发者ID:spark,项目名称:firmware,代码行数:9,代码来源:radio.c

示例7: otGetThreadNetif

AnnounceBeginServer &AnnounceBeginServer::GetOwner(const Context &aContext)
{
#if OPENTHREAD_ENABLE_MULTIPLE_INSTANCES
    AnnounceBeginServer &server = *static_cast<AnnounceBeginServer *>(aContext.GetContext());
#else
    AnnounceBeginServer &server = otGetThreadNetif().GetAnnounceBeginServer();
    OT_UNUSED_VARIABLE(aContext);
#endif
    return server;
}
开发者ID:lanyuwen,项目名称:openthread,代码行数:10,代码来源:announce_begin_server.cpp

示例8: otGetIp6

Mpl &Mpl::GetOwner(const Context &aContext)
{
#if OPENTHREAD_ENABLE_MULTIPLE_INSTANCES
    Mpl &mpl = *static_cast<Mpl *>(aContext.GetContext());
#else
    Mpl &mpl = otGetIp6().GetMpl();
    OT_UNUSED_VARIABLE(aContext);
#endif
    return mpl;
}
开发者ID:lanyuwen,项目名称:openthread,代码行数:10,代码来源:ip6_mpl.cpp

示例9: otGetThreadNetif

SupervisionListener &SupervisionListener::GetOwner(const Context &aContext)
{
#if OPENTHREAD_ENABLE_MULTIPLE_INSTANCES
    SupervisionListener &listener = *static_cast<SupervisionListener *>(aContext.GetContext());
#else
    SupervisionListener &listener = otGetThreadNetif().GetSupervisionListener();
    OT_UNUSED_VARIABLE(aContext);
#endif
    return listener;
}
开发者ID:NCTU-ivan,项目名称:embarc_osp,代码行数:10,代码来源:child_supervision.cpp

示例10: otPlatReset

void otPlatReset(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);

#if OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
    gPlatformPseudoResetWasRequested = true;
    sResetReason                     = POWER_RESETREAS_SREQ_Msk;
#else  // if OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
    NVIC_SystemReset();
#endif // else OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
}
开发者ID:abtink,项目名称:openthread,代码行数:11,代码来源:misc.c

示例11: otPlatRadioSleep

otError otPlatRadioSleep(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);
    if (sState == OT_RADIO_STATE_RECEIVE)
    {
        qorvoRadioSetRxOnWhenIdle(false);
        sState = OT_RADIO_STATE_SLEEP;
    }

    return OT_ERROR_NONE;
}
开发者ID:abtink,项目名称:openthread,代码行数:11,代码来源:radio.c

示例12: OT_UNUSED_VARIABLE

otError CoapSecure::Send(ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo)
{
    OT_UNUSED_VARIABLE(aMessageInfo);

    otError error;

    SuccessOrExit(error = mTransmitQueue.Enqueue(aMessage));
    mTransmitTask.Post();

exit:
    return error;
}
开发者ID:abtink,项目名称:openthread,代码行数:12,代码来源:coap_secure.cpp

示例13: otPlatRadioReceive

otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
{
    OT_UNUSED_VARIABLE(aInstance);

    bool result;

    nrf_802154_channel_set(aChannel);
    nrf_802154_tx_power_set(sDefaultTxPower);
    result = nrf_802154_receive();
    clearPendingEvents();

    return result ? OT_ERROR_NONE : OT_ERROR_INVALID_STATE;
}
开发者ID:spark,项目名称:firmware,代码行数:13,代码来源:radio.c

示例14: otPlatRadioDisable

otError otPlatRadioDisable(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);
    if (otPlatRadioIsEnabled(aInstance))
    {
        if (sState == OT_RADIO_STATE_RECEIVE)
        {
            qorvoRadioSetRxOnWhenIdle(false);
        }
        sState = OT_RADIO_STATE_DISABLED;
    }

    return OT_ERROR_NONE;
}
开发者ID:abtink,项目名称:openthread,代码行数:14,代码来源:radio.c

示例15: otPlatRadioSleep

otError otPlatRadioSleep(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);

    if (nrf_802154_sleep())
    {
        clearPendingEvents();
    }
    else
    {
        clearPendingEvents();
        setPendingEvent(kPendingEventSleep);
    }

    return OT_ERROR_NONE;
}
开发者ID:spark,项目名称:firmware,代码行数:16,代码来源:radio.c


注:本文中的OT_UNUSED_VARIABLE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。