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.

[参考译文] C2000字节= 16位问题。

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1183145/c2000-byte-16-bits-questions

您好!  

我有几个问题、所有这些问题都与 C2000的"字节= 2字节"现象有关:

1.当我复制非偶数字节大小时,内存是否会按预期工作? (或者简单地说最后一个参数将会生效两倍于大?)

2.将通过访问 RAM 中的27个字节进行 printf 并在本示例中打印它们(最后一个字节为 NULL)。

3“C2000”strlen()将返回什么结果?

4.能否定义 pack (1)结构?

5.如何在    存储器区域的奇数尺寸上瓶胚 CRC32?

6.该 MCU 是否有 SASASASA20实施?

6.我能否用位字段定义结构?

7.我能否在 SPI/UART 之间读取/写入单字节数据(我知道  UART 有一个不同的名称、原因是为何要使用 60年代中期的内容?)

8.如何创建一个包含奇数大小(字节计数)元素的压缩结构,例如 :?

同时,假设 b 是 uint8_t (个字节), 而没有 byte() 内在函数,如何访问"b" ?

struct my_struct {

    char a[3];
    bool b;
    char c[3];
};

9. memcmp() 返回的值为:{ 0xa5、0xa7、0xa3 }和  { 0xa5、0xa7、0xa3、0x00 }?

谢谢、

Eitan Michaelson、

以色列 SolarEdge。