-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vincent Dupont
committed
Dec 15, 2016
1 parent
46bb228
commit ee338f4
Showing
1 changed file
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,82 @@ | ||
/* | ||
* Copyright (C) 2016 OTA keys S.A. | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @defgroup boards_nucleo-f207 Nucleo-F207 | ||
* @ingroup boards | ||
* @brief Board specific files for the nucleo-f207 board | ||
* @{ | ||
* | ||
* @file | ||
* @brief CAN specific definitions for the nucleo-f207 board | ||
* | ||
* @author Vincent Dupont <vincent@otakeys.com> | ||
*/ | ||
|
||
#ifndef CAN_CONF_H | ||
#define CAN_CONF_H | ||
|
||
#endif // CAN_CONF_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include "can/config.h" | ||
|
||
#include "candev_stm32.h" | ||
|
||
const static candev_stm32_conf_t can_config_candev_stm32[] = { | ||
{ | ||
.channel = CANDEV_STM32_CHANNEL_0, | ||
.rx_pin = GPIO_PIN(PORT_D, 0), | ||
.tx_pin = GPIO_PIN(PORT_D, 1), | ||
.af = GPIO_AF9, | ||
.tx_irqn = CAN1_TX_IRQn, | ||
.rx0_irqn = CAN1_RX0_IRQn, | ||
.rx1_irqn = CAN1_RX1_IRQn, | ||
.sce_irqn = CAN1_SCE_IRQn, | ||
.ttcm = 0, | ||
.abom = 1, | ||
.awum = 1, | ||
.nart = 0, | ||
.rflm = 0, | ||
.txfp = 0, | ||
}, | ||
{ | ||
.channel = CANDEV_STM32_CHANNEL_1, | ||
.rx_pin = GPIO_PIN(PORT_B, 5), | ||
.tx_pin = GPIO_PIN(PORT_B, 6), | ||
.af = GPIO_AF9, | ||
.tx_irqn = CAN2_TX_IRQn, | ||
.rx0_irqn = CAN2_RX0_IRQn, | ||
.rx1_irqn = CAN2_RX1_IRQn, | ||
.sce_irqn = CAN2_SCE_IRQn, | ||
.ttcm = 0, | ||
.abom = 1, | ||
.awum = 1, | ||
.nart = 0, | ||
.rflm = 0, | ||
.txfp = 0, | ||
} | ||
}; | ||
|
||
#define CANDEV_STM32_NUMOF (sizeof(can_config_candev_stm32) / sizeof(candev_stm32_conf_t)) | ||
#define CAN_DLL_NUMOF CANDEV_STM32_NUMOF | ||
|
||
const static can_iface_t candev_ifnum[] = { | ||
{ CAN_DRIVER_STM32, 0 }, | ||
{ CAN_DRIVER_STM32, 1 }, | ||
}; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* CAN_CONF_H */ | ||
|
||
/** @} */ | ||
|