0

I am trying to write C test code for SPI peripheral module for Pulpissimo.I have gone through the test case mentioned in pulp-rt examples.

[https://github.com/pulp-platform/pulp-rt-examples/tree/master/periph/spim][1]

But I understand that the above code need the support of an external board. I have no board available with me. Is there any way to write test case in C for SPI?

4

1 回答 1

0

我不认为你会找到支持 c 语言的 spi 模拟器。

SPI 是一个使用时钟/数据输入/数据输出的 3 线接口(可以使用更多位,如芯片选择等,但基本是 3 个引脚)。

C 是一种将生成二进制文件的编程语言,而不是解释的,因此可能不是模拟器的最佳语言。

您可能会找到最好的微控制器仿真器,它支持虚拟 GPIO 引脚中的振荡器,但我不知道。

正如 Rovert Harvey 告诉你的,你能做的最好的就是买一块板子,但你不需要花 100 欧元,只需花 2 欧元/美元买一块带 wifi、spi 和其他东西的 ESP8266 板子。然后使用 arduino ide,他们使用 .ine 文件,这些文件是对 .c 文件的轻微修改,它也支持 .c 文件。

于 2020-11-30T19:54:33.830 回答