Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARDUINO_ARCH_ESP32 forcing ESP32 internal CAN controller - Need MC2515 #140

Open
atestani opened this issue Jun 14, 2024 · 0 comments
Open

Comments

@atestani
Copy link

How do I use this library on an ESP32 (wroom-E32) with an MCP2515 external CAN controller. I am doing this project in PlatformIO with the Arduino framework. When I include CAN.h it checks ARDUINO_ARCH_ESP32 and selects the internal controller as ESP32SJA1000.h . If ARDUINO_ARCH_ESP32 is not defined (somehow) then MCP2515.h is included. This is the code in CAN.h:

#ifdef ARDUINO_ARCH_ESP32
#include "ESP32SJA1000.h"
#else
#include "MCP2515.h"
#endif

How do I get this to properly include MCP2515.h? I don't want to modify the CAN.h or any other part of the library unless this is the only way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant