微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > CC2640,链接参数可以修改吗?

CC2640,链接参数可以修改吗?

时间:10-02 整理:3721RD 点击:

#define DEFAULT_DESIRED_MIN_CONN_INTERVAL     400

#define DEFAULT_DESIRED_MAX_CONN_INTERVAL     800

上电初始化程序运行一段时间后,想修改链接参数,可以吗?

用下面的接口
/**
* @brief Update the parameters of an existing connection
*
* @param connInterval - the new connection interval
* @param latency - the new slave latency
* @param connTimeout - the new timeout value
* @param handleFailure - what to do if the update does not occur.
* Method may choose to terminate connection, try again, or take no action
*
* @return SUCCESS: operation was successful.
* INVALIDPARAMETER: Data can not fit into one packet.
* MSG_BUFFER_NOT_AVAIL: No HCI buffer is available.
* bleInvalidRange:
* bleIncorrectMode: invalid profile role.
* bleAlreadyInRequestedMode: already updating link parameters.
* bleNotConnected: Connection is down
* bleMemAllocError: Memory allocation error occurred.
* bleNoResources: No available resource
*/
extern bStatus_t GAPRole_SendUpdateParam(uint16_t minConnInterval,
uint16_t maxConnInterval,
uint16_t latency, uint16_t connTimeout,
uint8_t handleFailure);

参考SDK中cycling sensor 和 running sensor 的例子

你好,

是的,没有问题。

#define DEFAULT_DESIRED_MIN_CONN_INTERVAL     400

#define DEFAULT_DESIRED_MAX_CONN_INTERVAL     800

/*********************************************************************
* CONSTANTS
*/

后面!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top