TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2640R2 读写保护接口

你好:

我目前使用的CC2640R2 协议栈为4.2 请问下:

1.是否有提供相关的读写保护接口。

2.是否有提供相关的设备状态查询接口,这样我就能实时的知道当前设备处于什么状态,例如 当前设备在广播。

Viki Shi:

有,请参考右边文档的9.1节:www.ti.com.cn/…/swcu117h.pdf

Susan Yang:

1 请问具体是指哪方面的读写保护?

2 一般可以自己添加状态查询的接口

如在simple_peripheral.h中有

/// @brief GAP Peripheral Role States.
typedef enum
{GAPROLE_INIT = 0,//!< Waiting to be startedGAPROLE_STARTED,//!< Started but not advertisingGAPROLE_ADVERTISING,//!< Currently AdvertisingGAPROLE_ADVERTISING_NONCONN,//!< Currently using non-connectable AdvertisingGAPROLE_WAITING,//!< Device is started but not advertising, is in waiting period before advertising againGAPROLE_WAITING_AFTER_TIMEOUT,//!< Device just timed out from a connection but is not yet advertising, is in waiting period before advertising againGAPROLE_CONNECTED,//!< In a connectionGAPROLE_CONNECTED_ADV,//!< In a connection + advertisingGAPROLE_ERROR//!< Error occurred – invalid state
} gaprole_States_t;

您可以在simple_peripheral.c中的回调函数 SimpleBLEPeripheral_processStateChangeEvt 中进行修改

如下面的代码,添加显示的代码来表明现在是处于什么状态
case GAPROLE_ADVERTISING:Display_print0(dispHandle, SBP_ROW_ROLESTATE, 0, "Advertising");break;

Viki Shi:

连接状态可以用btool查看

user6255462:

回复 Viki Shi:

好的

user6255462:

回复 Viki Shi:

嗯呢 看到了 但是能在程序运行中 强制更改CCFG的值么?

user6255462:

回复 Susan Yang:

1.就是flash的读写保护.

赞(0)
未经允许不得转载:TI中文支持网 » CC2640R2 读写保护接口
分享到: 更多 (0)