ZHCU938C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
以下宏将设置 P2P 运行通道和侦听通道。侦听通道用于指示发现状态,可以是通道 1、6 或 11。等待 P2P 探针请求时,器件将处于此通道中。运行通道仅供 GO 使用。GO 将在协商阶段后转移到此通道。
默认值: 通道 1、6 或 11 之间的随机值
API:
sl_WlanSet(SL_WLAN_CFG_P2P_PARAM_ID, WLAN_P2P_OPT_CHANNEL_N_REGS, 4, channels);
2.4G 下的监管域等级应该是 81。
例如:
unsigned char channels [4];
channels [0] = (unsigned char)11; // listen channel
channels [1] = (unsigned char)81; // listen regulatory class
channels [2] = (unsigned char)6; // oper channel
channels [3] = (unsigned char)81; // oper regulatory class
sl_WlanSet(SL_WLAN_CFG_P2P_PARAM_ID, WLAN_P2P_OPT_CHANNEL_N_REGS, 4, channels);