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.

[参考译文] TMS320F28377S:不会按字节访问联合体中的元素

Guru**** 2451110 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/915049/tms320f28377s-byte-wise-access-of-elements-in-a-union-not-happening

器件型号:TMS320F28377S

您好!

我在联合体中创建了一个结构、如下所示。 我希望按字节访问联合体元素、但无法访问。 我只能按字访问。 请为我提供解决方案。

联合体名称

    字符 t[3];

   结构名称

   {

         INT A:16;

         int b:8;

   };

};

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

    您好!

    C2000器件上的 CHAR 为16位。 16位是 C2000器件上的最小访问类型。

    此致、

    Vivek Singh