Skip to content

ARDUINO_ARCH_ESP32 forcing ESP32 internal CAN controller - Need MC2515 #140

@atestani

Description

@atestani

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions