candev_stm32.h File Reference

bxCAN specific definitions More...

Detailed Description

bxCAN specific definitions

Author
Vincent Dupont vince.nosp@m.nt@o.nosp@m.takey.nosp@m.s.co.nosp@m.m

Definition in file candev_stm32.h.

#include "can/candev.h"
+ Include dependency graph for candev_stm32.h:

Go to the source code of this file.

Data Structures

struct  can_conf_t
 ESP CAN device configuration. More...
 
struct  candev_stm32_rx_fifo
 This structure holds anything related to the receive part. More...
 
struct  candev_stm32_isr
 Internal interrupt flags. More...
 
struct  can
 Low level device structure for ESP32 CAN (extension of candev_t) More...
 

Macros

#define CANDEV_STM32_CHAN_NUMOF   1
 Number of channels in the device (up to 3)
 
#define CAN_STM32_NB_FILTER   14
 
#define CANDEV_STM32_DEFAULT_BITRATE   500000U
 Default bitrate.
 
#define CANDEV_STM32_DEFAULT_SPT   875
 Default sampling-point.
 
#define HAVE_CAN_CONF_T
 can_conf_t is re-defined
 
#define CAN_STM32_TX_MAILBOXES   3
 The number of transmit mailboxes.
 
#define CAN_STM32_RX_MAILBOXES   2
 The number of receive FIFO.
 
#define CAN_STM32_RX_MAIL_FIFO   12
 This is the maximum number of frame the driver can receive simultaneously.
 
#define HAVE_CAN_T
 can_t is re-defined
 

Typedefs

typedef struct can can_t
 bxCAN candev descriptor
 
typedef struct candev_stm32_rx_fifo candev_stm32_rx_fifo_t
 This structure holds anything related to the receive part.
 
typedef struct candev_stm32_isr candev_stm32_isr_t
 Internal interrupt flags.
 

Functions

void candev_stm32_set_pins (can_t *dev, gpio_t tx_pin, gpio_t rx_pin, gpio_af_t af)
 Set the pins of an stm32 CAN device. More...
 

ISR functions

#define ISR_CAN1_TX   isr_can1_tx
 
#define ISR_CAN1_RX0   isr_can1_rx0
 
#define ISR_CAN1_RX1   isr_can1_rx1
 
#define ISR_CAN1_SCE   isr_can1_sce
 
#define ISR_CAN2_TX   isr_can2_tx
 
#define ISR_CAN2_RX0   isr_can2_rx0
 
#define ISR_CAN2_RX1   isr_can2_rx1
 
#define ISR_CAN2_SCE   isr_can2_sce
 
#define ISR_CAN3_TX   isr_can3_tx
 
#define ISR_CAN3_RX0   isr_can3_rx0
 
#define ISR_CAN3_RX1   isr_can3_rx1
 
#define ISR_CAN3_SCE   isr_can3_sce
 

Function Documentation

◆ candev_stm32_set_pins()

void candev_stm32_set_pins ( can_t dev,
gpio_t  tx_pin,
gpio_t  rx_pin,
gpio_af_t  af 
)

Set the pins of an stm32 CAN device.

Parameters
[in,out]devthe device to set pins
[in]tx_pintx pin
[in]rx_pinrx pin
[in]afalternate function