• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OT_UNUSED_VARIABLE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: otPlatSettingsInit

// settings API
void otPlatSettingsInit(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);

    uint8_t  index;
    uint32_t settingsSize = SETTINGS_CONFIG_PAGE_SIZE * SETTINGS_CONFIG_PAGE_NUM / 2;

    sSettingsBaseAddress = SETTINGS_CONFIG_BASE_ADDRESS;

    utilsFlashInit();

    for (index = 0; index < 2; index++)
    {
        uint32_t blockFlag;

        sSettingsBaseAddress += settingsSize * index;
        utilsFlashRead(sSettingsBaseAddress, (uint8_t *)(&blockFlag), sizeof(blockFlag));

        if (blockFlag == OT_SETTINGS_IN_USE)
        {
            break;
        }
    }

    if (index == 2)
    {
        initSettings(sSettingsBaseAddress, (uint32_t)OT_SETTINGS_IN_USE);
    }

    sSettingsUsedSize = OT_SETTINGS_FLAG_SIZE;

    while (sSettingsUsedSize < settingsSize)
    {
        struct settingsBlock block;

        utilsFlashRead(sSettingsBaseAddress + sSettingsUsedSize, (uint8_t *)(&block), sizeof(block));

        if (!(block.flag & OT_FLASH_BLOCK_ADD_BEGIN_FLAG))
        {
            sSettingsUsedSize += (getAlignLength(block.length) + sizeof(struct settingsBlock));
        }
        else
        {
            break;
        }
    }
}
开发者ID:abtink,项目名称:openthread,代码行数:48,代码来源:settings_flash.c


示例17: otPlatRadioGetTransmitPower

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

    otError error = OT_ERROR_NONE;

    if (aPower == NULL)
    {
        error = OT_ERROR_INVALID_ARGS;
    }
    else
    {
        *aPower = sDefaultTxPower;
    }

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


示例18: otPlatRadioClearSrcMatchExtEntry

otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
{
    OT_UNUSED_VARIABLE(aInstance);

    otError error;

    if (nrf_802154_pending_bit_for_addr_clear(aExtAddress->m8, true))
    {
        error = OT_ERROR_NONE;
    }
    else
    {
        error = OT_ERROR_NO_ADDRESS;
    }

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


示例19: otPlatSettingsDelete

otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex)
{
    OT_UNUSED_VARIABLE(aInstance);

    otError  error   = OT_ERROR_NOT_FOUND;
    uint32_t address = sSettingsBaseAddress + OT_SETTINGS_FLAG_SIZE;
    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 (aIndex == index || aIndex == -1)
                {
                    error = OT_ERROR_NONE;
                    block.flag &= (~OT_FLASH_BLOCK_DELETE_FLAG);
                    utilsFlashWrite(address, (uint8_t *)(&block), sizeof(block));
                }

                if (index == 1 && aIndex == 0)
                {
                    block.flag &= (~OT_FLASH_BLOCK_INDEX_0_FLAG);
                    utilsFlashWrite(address, (uint8_t *)(&block), sizeof(block));
                }

                index++;
            }
        }

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

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


示例20: otPlatRadioDisable

otError otPlatRadioDisable(otInstance *aInstance)
{
    otError error;

    OT_UNUSED_VARIABLE(aInstance);

    if (!sDisabled)
    {
        sDisabled = true;
        error     = OT_ERROR_NONE;
    }
    else
    {
        error = OT_ERROR_INVALID_STATE;
    }

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OUR_DEBUG函数代码示例发布时间:2022-05-30
下一篇:
C++ OT_ASSERT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap