jasonful / lcc

The lcc retargetable ANSI C compiler
http://sites.google.com/site/lccretargetablecompiler
95 stars 10 forks source link

Examples #12

Closed DatanoiseTV closed 3 years ago

DatanoiseTV commented 4 years ago

Nice to see a C compiler for the ULP! I've seen you've added I2C peripheral support, but do you have any examples or suggestions how to use SPI? I wanted to use the ULP to push data to a SPI DAC.

jasonful commented 3 years ago

The ULP has support for I2C built-in, but not SPI. However, you could bitbang SPI -- there is an exmaple at https://github.com/espressif/esp-iot-solution/tree/aa93c24d94fbcd961d3c87c7831194dcbfdb5968/examples/ulp_examples/ulp_spi