can bus driver files

skanky
Posts: 20
Joined: Mon Nov 21, 2022 12:58 pm

can bus driver files

Postby skanky » Mon Feb 06, 2023 4:14 pm

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 ?)

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: can bus driver files

Postby ESP_Sprite » Tue Feb 07, 2023 12:35 am

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.)

skanky
Posts: 20
Joined: Mon Nov 21, 2022 12:58 pm

Re: can bus driver files

Postby skanky » Tue Feb 07, 2023 11:20 am

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 :-)

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: can bus driver files

Postby ESP_Sprite » Wed Feb 08, 2023 12:53 am

I'll give the docs team a poke, perhaps we can add a warning like that.

Who is online

Users browsing this forum: Bing [Bot], ESP_rrtandler and 120 guests