mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
Merge pull request #16169 from benpicco/cpu/stm32/candev_cleanup
cpu/stm32: candev: derive number of CAN interfaces from vendor header
This commit is contained in:
commit
9ea7f5b9ed
@ -37,13 +37,12 @@ extern "C" {
|
||||
|
||||
#include "can/candev.h"
|
||||
|
||||
#if defined(CPU_LINE_STM32F413xx) || defined(CPU_LINE_STM32F423xx)
|
||||
#define CANDEV_STM32_CHAN_NUMOF 3
|
||||
#elif defined(CPU_FAM_STM32F1) || defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4)
|
||||
#define CANDEV_STM32_CHAN_NUMOF 2
|
||||
#elif defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3) || \
|
||||
defined(CPU_FAM_STM32L4) || defined(CPU_LINE_STM32F722xx) || DOXYGEN
|
||||
/** Number of channels in the device (up to 3) */
|
||||
#if defined(CAN3)
|
||||
#define CANDEV_STM32_CHAN_NUMOF 3
|
||||
#elif defined(CAN2)
|
||||
#define CANDEV_STM32_CHAN_NUMOF 2
|
||||
#elif defined(CAN1) || defined(CAN) || DOXYGEN
|
||||
#define CANDEV_STM32_CHAN_NUMOF 1
|
||||
#else
|
||||
#error "CAN STM32: CPU not supported"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user