Arduino-STM32-CAN
Arduino-STM32-CAN copied to clipboard
convert to user-friendly library
hello, first thanks for your work! Maybe for usability and to simplify the code for the enduser, convert to a library? So that the main code dont get overload with background tasks. Only include the lib, init the CAN and call constructors like ReadCan or SendCan in the loop.
As you can see from the source, the usage of the BxCan register is different for each model. The code I provide doesn't work properly on other models.
Even if it is converted to a library, it will be a library for each model. Perhaps such a library is awkward to use.
We need A generic library that can be used on all models. This can only be created with ST-Micro.
Maybe you could merge all in one library and the user make config with #define at the begin of the sketch.
like ` #define MCU F40x //MCU variant
#define Channels 1 //1 or 2 available channels
#define RX1 PA10 //RX pin Channel 1
#define TX1 PA9 //TX pin Channel 2 `
as far as I know F103 and others are too different. They are almost different code. Check with my code. Almost impossible to merge,
hi, are you able to create an example arduino program for one IC, then just change the included .h file? I am struggling to understand how to use your code
are you able to create an example arduino program for one IC
What is one IC?
I've ported the code to a number of STM32s.
As a result, it turned out that it is completely impossible to support many boards with one library.