On the UFQFPN28 and TSSOP20 packages, pins PA11/PA12 must be remapped in place of pins PA9/PA10 to use the CAN peripheral. I do this in my code with SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP. I think it would be good to include this in your library if practical.
On the UFQFPN28 and TSSOP20 packages, pins PA11/PA12 must be remapped in place of pins PA9/PA10 to use the CAN peripheral. I do this in my code with
SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP
. I think it would be good to include this in your library if practical.