mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/conn_can: build stm32 CAN drivers
Build can_stm32 module on boards which have a stm32 CAN controller.
This commit is contained in:
parent
ae95137f95
commit
74ddf56171
@ -17,8 +17,8 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifndef CANDEV_STM32_PARAMS_H
|
||||
#define CANDEV_STM32_PARAMS_H
|
||||
#ifndef CAN_PARAMS_H
|
||||
#define CAN_PARAMS_H
|
||||
|
||||
#include "can/device.h"
|
||||
#include "periph/can.h"
|
||||
@ -135,4 +135,4 @@ static const candev_params_t candev_params[] = {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CANDEV_STM32_PARAMS_H */
|
||||
#endif /* CAN_PARAMS_H */
|
||||
|
@ -45,6 +45,10 @@ extern "C" {
|
||||
#error "CAN STM32: CPU not supported"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name ISR functions
|
||||
* @{
|
||||
*/
|
||||
#if defined(CPU_FAM_STM32F1)
|
||||
#define ISR_CAN1_TX isr_usb_hp_can1_tx
|
||||
#define ISR_CAN1_RX0 isr_usb_lp_can1_rx0
|
||||
@ -64,6 +68,7 @@ extern "C" {
|
||||
#define ISR_CAN3_RX1 isr_can3_rx1
|
||||
#define ISR_CAN3_SCE isr_can3_sce
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
#if CANDEV_STM32_CHAN_NUMOF > 1 || DOXYGEN
|
||||
/** The maximum number of filters: 28 for dual channel, 14 for single channel */
|
||||
@ -119,6 +124,7 @@ typedef struct {
|
||||
uint8_t lbkm : 1; /**< Loopback mode */
|
||||
uint8_t silm : 1; /**< Silent mode */
|
||||
} can_conf_t;
|
||||
/** can_conf_t is re-defined */
|
||||
#define HAVE_CAN_CONF_T
|
||||
|
||||
/** The number of transmit mailboxes */
|
||||
@ -134,6 +140,7 @@ typedef struct {
|
||||
|
||||
/** bxCAN candev descriptor */
|
||||
typedef struct can can_t;
|
||||
/** can_t is re-defined */
|
||||
#define HAVE_CAN_T
|
||||
|
||||
/** This structure holds anything related to the receive part */
|
||||
|
@ -32,6 +32,10 @@
|
||||
#include "periph_cpu.h"
|
||||
#include "can/candev.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CAN_T
|
||||
/**
|
||||
* @brief CAN device descriptor identifier
|
||||
@ -43,7 +47,7 @@ typedef candev_t can_t;
|
||||
/**
|
||||
* @brief CAN configuration identifier
|
||||
*/
|
||||
typedef void can_conf_t;
|
||||
typedef int can_conf_t;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -54,4 +58,9 @@ typedef void can_conf_t;
|
||||
*/
|
||||
void can_init(can_t *dev, const can_conf_t *conf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PERIPH_CAN_H */
|
||||
/** @} */
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup auto_init
|
||||
* @ingroup sys_auto_init
|
||||
* @{
|
||||
* @file
|
||||
* @brief initializes periph_can devices
|
||||
|
@ -9,8 +9,6 @@ BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-nano \
|
||||
saml11-xpro stm32f0discovery telosb waspmote-pro \
|
||||
wsn430-v1_3b wsn430-v1_4 z1
|
||||
|
||||
CFLAGS += -DLOG_LEVEL=LOG_ALL
|
||||
|
||||
USEMODULE += shell
|
||||
USEMODULE += shell_commands
|
||||
USEMODULE += ps
|
||||
@ -21,4 +19,7 @@ USEMODULE += conn_can_isotp_multi
|
||||
USEMODULE += can_pm
|
||||
USEMODULE += can_trx
|
||||
|
||||
FEATURES_REQUIRED += periph_can
|
||||
FEATURES_REQUIRED += periph_gpio_irq
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
Loading…
Reference in New Issue
Block a user