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.

[参考译文] MSP430FR2355:如何在缓冲区周围执行数学运算

Guru**** 2539500 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/903396/msp430fr2355-how-to-do-math-on-wrap-around-buffer

器件型号:MSP430FR2355

我有一个6深的循环缓冲器。  在某个时间点、其中一个数组条目将具有0xFE。  这将标记并识别第0点。  我想进行简单的数学运算(XOR)、以查找在这一点之前和之后连续条目的更改、并确定每个条目的时间在缓冲区自身限制范围内的哪个位置。   在我看来、最简单的事情是将原始数组排列为下面的新数组、但对于我而言、这似乎非常困难。  有人对此有简单的解决方案吗?

原始阵列  

[*p-4、*p-3、*p-2、*p-1、0xFE、  *P+1]

新阵列

[0xFE、*p+1、*p-4、*p-3、*p-2、 *P-1]

谢谢你