SPI test case in C for Pulpissimo

307 views Asked by At

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?

1

There are 1 answers

0
Hamboy75 On

I dont think that you will find a spi emulator supporting c language.

SPI is a 3 wire interfaces using clock/data in / data out (more bits can be used like chip select and others, but basic is 3 pins).

C is a programming language that will generate a binary file, not interpreted, so probably not the best language for a emulator.

The best that you can probably find is a microcontroller emulator that support an oscillator in virtual GPIO pins, but i dont know any.

As Rovert Harvey told you, the best that you can do is buy a board, but you dont need to spend 100 euros, just buy a ESP8266 board with wifi , spi, and other stuff for 2 euros/dollars. Then use arduino ide, they use .ine files that are a light modification of .c files and it supports .c files too.