pazi88 / STM32_CAN

CAN bus Library for Arduino STM32
GNU General Public License v3.0
67 stars 28 forks source link

Specify can individual can pins from program #1

Open phoenixs3 opened 2 years ago

phoenixs3 commented 2 years ago

While having default and alternate pin preset declarations is useful, for certain applications (such as mine) I use PB5 and PB13 for can 2. This is not possible without a library modification currently.

Ideally functionality would be: STM32_CAN Can2(CAN2, PB_5, PB_13);

pazi88 commented 2 years ago

Didn't even know that you can mix the CAN TX and RX alternative pins like that. At least with F103 the RX and TX pins come in those predefined "pairs". Though for other ones that might be possible to do, but I haven't tested at all. If it works, I can add function for that.