This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/MSP430FR4133:电源(ULP)建议无法识别无符号字符

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/912071/ccs-msp430fr4133-power-ulp-advice-does-not-recognize-an-unsigned-char

器件型号:MSP430FR4133

工具/软件:Code Composer Studio

我有以下代码:

void D5TE_getData (uint8_t *数据)
{
uint8_t I;

for (i = 13;i > 0;i-)
{
data[13 - i]= rxBuffer[13 - i];
}

以及下一个建议:

#2553-D (ULP 14.1)"int"类型的数组索引(涉及"i")。 建议使用"unsigned int"  

您能告诉我为什么它不能识别 unsigned char、因为对我来说、为放置 unsigned int 是没有意义的

这里的值数量、我应该删除该提示、或者我可以执行一些操作

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我只能猜测[13-i]计算会提升为有符号。 尝试使用[13U-i]

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    它正在工作! 谢谢!