Please note: This repository is non-functional at the moment. Please star or watch it to get notified of any changes!
TWAI for ESP32 running nanoframework
The aim of this repository is to add Espressifs TWAI (aka CAN bus) driver to the nanoframework.
This is a work in progress and not yet functional.
Make sure you are able to compile
nf-interpreter
. Follow this tutorial to learn how.
You have two ways to clone this repository:
Clone the repository into your nf-interpreter/InteropAssemblies
folder
Clone the repository wherever you want and symlink to the folder in nf-interpreter/InteropAssemblies
Open CMakePresets.json
and add NF.TWAI
to your boards NF_INTEROP_ASSEMBLIES
list
For example:
{
"name": "ESP32_OLIMEX_preset",
"inherits": [
"general-preset",
"xtensa-esp32-preset"
],
"cacheVariables": {
"NF_INTEROP_ASSEMBLIES" : "NF.TWAI"
}
}
Copy FindINTEROP-NF.TWAI.cmake
found in this repo under Stubs/NF.TWAI
to CMake/Modules
in your nf-interpreter
folder.
Build a firmware image (in this case for ESP32_OLIMEX
).
Observe the output. It should display NF.TWAI
in Interop assemblies included
Open your nanoframework projects and add a reference to NF.TWAI
by right-clicking on the project and selecting Add Reference...
and then Browse...
and selecting NF.TWAI.dll
from bin/Debug
.
This library depends on nanoFramework.Hardware.ESP32
.
You can install it through nuget!
That's it. You can now use TWAI!