Page 1 of 1

can bus driver files

Posted: Mon Feb 06, 2023 4:14 pm
by skanky
The espressif api-reference shows how to use the can bus peripheral:
https://docs.espressif.com/projects/esp ... s/can.html

However the "driver/can.c", "driver/can.h" and "soc/can_struct.h" files are not actually present in the esp-idf install / master branch.
Where can I find the current version of these files (suitable for the ESP32S3 ?)

Re: can bus driver files

Posted: Tue Feb 07, 2023 12:35 am
by ESP_Sprite
The docs you're refering to are for ESP-IDF 3.3.5, which is pretty old and which probably isn't the version you're using. You probably want something like this. (Note that the CAN peripheral got renamed to TWAI because of reasons. It's still the same peripheral.)

Re: can bus driver files

Posted: Tue Feb 07, 2023 11:20 am
by skanky
Thank you.
It would be good if these old docs had a note at the top saying they are old, there's no indication I could see that they are to someone new to ESP. Also a note about the change to TWAI would be great at the top of that page too as it ranks high on a "ESP32 can bus" google search.
Thanks for the response, much appreciated :-)

Re: can bus driver files

Posted: Wed Feb 08, 2023 12:53 am
by ESP_Sprite
I'll give the docs team a poke, perhaps we can add a warning like that.