CC2640,链接参数可以修改吗?
#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
*/
后面!