请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
主题中讨论的其他器件:SIMPLELINK-CC13XX-CC26XX-SDK、 Z-STACK您好!
我在 API SYS_SET_TX_POWER 上运行。
查看文档、SRSP 的数据为1字节:TX 功率;但查看 ZStack 代码、返回消息 Build in return 是操作的状态(MAC_SUCCESS 或 MAC_INVALID_PARAMETER)、而不是文档所述的当前 TX 功率。
哪一个是正确的?
static void MT_SysSetTxPower(uint8_t *pBuf)
{
/* A local variable to hold the signed dBm value of TxPower that is being requested. */
int8_t txPower;
uint8_t status;
/* Parse the requested dBm from the RPC message. */
txPower = pBuf[MT_RPC_POS_DAT0];
status = MAP_MAC_MlmeSetReq(MAC_PHY_TRANSMIT_POWER_SIGNED, &txPower);
// Send back response that includes the status of the set command.
// either: MAC_SUCCESS or MAC_INVALID_PARAMETER
MT_BuildAndSendZToolResponse( MT_SRSP_SYS, MT_SYS_SET_TX_POWER, 1,
&status);
}