Merge pull request #53 CAN fixes
Merge remote-tracking branch 'tdaede/master'
This commit is contained in:
@@ -18,7 +18,16 @@
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/can.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
|
||||
#if defined(STM32F1)
|
||||
# include <libopencm3/stm32/f1/rcc.h>
|
||||
#elif defined(STM32F2)
|
||||
# include <libopencm3/stm32/f2/rcc.h>
|
||||
#elif defined(STM32F4)
|
||||
# include <libopencm3/stm32/f4/rcc.h>
|
||||
#else
|
||||
# error "stm32 family not defined."
|
||||
#endif
|
||||
|
||||
void can_reset(u32 canport)
|
||||
{
|
||||
@@ -299,5 +308,5 @@ void can_receive(u32 canport, u8 fifo, bool release, u32 *id, bool *ext,
|
||||
|
||||
/* Release the FIFO. */
|
||||
if (release)
|
||||
can_fifo_release(CAN1, 0);
|
||||
can_fifo_release(canport, fifo);
|
||||
}
|
||||
Reference in New Issue
Block a user