#include <cfg/os.h>
#include <cfg/clock.h>
#include <cfg/arch.h>
#include <cfg/can_dev.h>
#include <cfg/arch/gpio.h>
#include <sys/atom.h>
#include <sys/event.h>
#include <sys/timer.h>
#include <dev/irqreg.h>
#include <dev/gpio.h>
#include <dev/canbus.h>
#include <arch/cm3/stm/stm32xxxx.h>
#include <arch/cm3/stm/stm32xxxx_gpio.h>
#include <arch/cm3/stm/stm32xxxx_rcc.h>
Defines | |
#define | CANBUS2_REMAP_CAN 0 |
#define | CAN2_GPIO_PORT NUTGPIO_PORTB |
CANBUS2 GPIO configuartion and assignment. | |
#define | CAN2TX_GPIO_PIN 13 |
#define | CAN2RX_GPIO_PIN 12 |
Functions | |
int | Stm32CanHw2Init (void) |
Processor specific Hardware Initiliaization. | |
Variables | |
NUTCANBUS | Stm32CanBus2 |
NUTCANBUS | Stm32CanBus2C |
#define CANBUS2_REMAP_CAN 0 |
#define CAN2_GPIO_PORT NUTGPIO_PORTB |
CANBUS2 GPIO configuartion and assignment.
Referenced by Stm32CanHw2Init().
#define CAN2TX_GPIO_PIN 13 |
Referenced by Stm32CanHw2Init().
#define CAN2RX_GPIO_PIN 12 |
Referenced by Stm32CanHw2Init().
int Stm32CanHw2Init | ( | void | ) |
Processor specific Hardware Initiliaization.
References __IO, _BI32, CAN1, CAN2_GPIO_PORT, CAN2RX_GPIO_PIN, CAN2TX_GPIO_PIN, CM3BB_BASE, CM3BB_OFFSET, ENABLE, GPIO_AF_CAN2, GPIO_CFG_OUTPUT, GPIO_CFG_PULLUP, GPIO_PinAFConfig(), GPIO_PinRemapConfig(), GpioPinConfigSet(), rc, RCC_APB1ENR_CAN1EN, RCC_APB1ENR_CAN2EN, RCC_APB1RSTR_CAN1RST, RCC_APB1RSTR_CAN2RST, and RCC_BASE.
{ CAN2_BASE, CM3BB_BASE(CAN2_BASE), &sig_CAN2_RX0, &sig_CAN2_TX, &sig_CAN2_SCE, 0, Stm32CanHw2Init, }
{ CAN2_BASE, CM3BB_BASE(CAN2_BASE), &sig_CAN2_RX1, 0, 0, 0, 0, }