tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.25k stars 900 forks source link

ESP32 Can Bus (TWAI) #4480

Open MrNavaStar opened 1 week ago

MrNavaStar commented 1 week ago

The esp32 has a built in can controller than can interface with a TJA1050 or similar to allow for communication via the CAN protocol. As far as I can tell, this feature is not implemented and I haven't found any libraries that do so either.

Could someone point me in the direction of where to get started implementing this feature? Should it be added as to this repo as a board specific feature, or as a driver?

Any help would be appreciated, thanks!

aykevl commented 4 days ago

This should be implemented in the machine package. To get an idea of how it is done, you can see the I2C PR here: https://github.com/tinygo-org/tinygo/pull/4259