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.

[参考译文] MSP430F5510:MSP430F5510代码

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1001596/msp430f5510-msp430f5510-code

器件型号:MSP430F5510

为什么我遇到错误:“需要声明”

有什么关系?

#define Rb_initialize (rb)(rb)
操作

(rb).read_idx = 0;
(rb).write_idx = 0;
(rb).data_CT = 0;

while (0);

在我看来、这似乎是一个正确的定义例程。

erubin@tetracore.com

ephirubin0719@cox.net

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

    您好像错过了行连续反斜杠、例如:

    执行  \
    {   \

    (依此类推)。

    未经请求:如果您要使用"do{}while (0)"表单、则应保留最后一个分号、以便您获得该表单的好处。

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

    谢谢! Bruce。 你是对的。