nRF51_SDK_10.0.0_dc26b5e.zip


nRF51 SDK v10.0.0 ----------------- Release Date: Week 46 Highlights: - New BLE Peer Manager (experimental), replacement for the BLE Device Manager - FreeRTOS support - New ANT modules, additional examples, and new and expanded ANT+ profiles - Support for Dynastream'
资源截图
代码片段和文件信息
/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is property of Nordic Semiconductor ASA.
 * Terms and conditions of usage are described in detail in NORDIC
 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
 *
 * Licensees are granted free non-transferable use of the information. NO
 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
 * the file.
 *
 */

#include “ant_channel_config.h“
#include “ant_interface.h“
#include “ant_parameters.h“
#include “nrf_error.h“

uint32_t ant_channel_init(ant_channel_config_t const * p_config)
{
    uint32_t err_code;
    // Set Channel Number.
    err_code = sd_ant_channel_assign(p_config->channel_number 
                                     p_config->channel_type 
                                     p_config->network_number
                                     p_config->ext_assign);

    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    // Set Channel ID.
    err_code = sd_ant_channel_id_set(p_config->channel_number 
                                     p_config->device_number 
                                     p_config->device_type 
                                     p_config->transmission_type);

    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    // Set Channel RF frequency.
    err_code = sd_ant_channel_radio_freq_set(p_config->channel_number p_config->rf_freq);

    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    // Set Channel period.
    if (!(p_config->ext_assign & EXT_PARAM_ALWAYS_SEARCH))
    {
        err_code = sd_ant_channel_period_set(p_config->channel_number p_config->channel_period);
    }
    
    
#if ANT_CONFIG_ENCRYPTED_CHANNELS > 0
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    
    err_code = ant_channel_encrypt_config(p_config->channel_type  p_config->channel_number p_config->p_crypto_settings);
#endif
    
    return err_code;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-11-09 18:39  components
     目录           0  2015-11-09 18:33  componentsant
     目录           0  2015-11-09 18:39  componentsantant_channel_config
     文件        2080  2015-11-09 18:33  componentsantant_channel_configant_channel_config.c
     文件        1972  2015-11-09 18:33  componentsantant_channel_configant_channel_config.h
     目录           0  2015-11-09 18:39  componentsantant_encryption
     文件        7487  2015-11-09 18:33  componentsantant_encryptionant_encrypt_config.c
     文件        9923  2015-11-09 18:33  componentsantant_encryptionant_encrypt_config.h
     文件        5652  2015-11-09 18:33  componentsantant_encryptionant_encrypt_negotiation_slave.c
     文件        3920  2015-11-09 18:33  componentsantant_encryptionant_encrypt_negotiation_slave.h
     目录           0  2015-11-09 18:39  componentsantant_key_manager
     文件        1181  2015-11-09 18:33  componentsantant_key_managerant_key_manager.c
     文件        1931  2015-11-09 18:33  componentsantant_key_managerant_key_manager.h
     目录           0  2015-11-09 18:33  componentsantant_key_managerconfig
     文件         966  2015-11-09 18:33  componentsantant_key_managerconfigant_key_manager_config.h
     目录           0  2015-11-09 18:39  componentsantant_profiles
     目录           0  2015-11-09 18:39  componentsantant_profilesant_bpwr
     文件       15953  2015-11-09 18:33  componentsantant_profilesant_bpwrant_bpwr.c
     文件       17426  2015-11-09 18:33  componentsantant_profilesant_bpwrant_bpwr.h
     文件        1949  2015-11-09 18:33  componentsantant_profilesant_bpwrant_bpwr_local.h
     目录           0  2015-11-09 18:39  componentsantant_profilesant_bpwrpages
     文件        2069  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_common_data.c
     文件        2029  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_common_data.h
     文件        1254  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_pages.h
     文件        9112  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_1.c
     文件        3891  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_1.h
     文件        2903  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_16.c
     文件        2595  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_16.h
     文件        1377  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_17.c
     文件        1727  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_17.h
     文件        1377  2015-11-09 18:33  componentsantant_profilesant_bpwrpagesant_bpwr_page_18.c
............此处省略9135个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)