14#include "mcu_periph/can_arch.h"
16#include "mcu_periph/sys_time_arch.h"
47 .can_baudrate = 1000000U,
63 .can_baudrate = 1000000U,
64 .memory_offset = (128*3),
112 if(rx_frame.common.XTD) {
115 id = rx_frame.std.SID;
117 if(rx_frame.common.RTR) {
120 if(rx_frame.common.ESI) {
134 if(rx_frame.common.ESI) {
156 frame.common.RTR = 1;
159 frame.common.XTD = 1;
190 #if defined(STM32_CAN_USE_FDCAN1) || defined(STM32_CAN_USE_FDCAN2)
195 cas->cfg.TXESC = 0x000;
196 cas->cfg.RXESC = 0x000;
214 if (
cas->can_baudrate < 1) {
219#if defined(STM32_CAN_USE_FDCAN1) || defined(STM32_CAN_USE_FDCAN2)
224 static const int MaxBS1 = 16;
225 static const int MaxBS2 = 8;
263 if ((prescaler < 1U) || (prescaler > 1024U)) {
312#if defined(STM32_CAN_USE_FDCAN1) || defined(STM32_CAN_USE_FDCAN2)
uint8_t can_dlc_to_len(uint8_t dlc)
uint8_t can_len_to_dlc(uint8_t len)
#define CAN_NB_CALLBACKS_MAX
static bool canConfigureIface(struct can_arch_periph *cas)
Try to compute the timing registers for the can interface and set the configuration.
static void can_thd_rx(void *arg)
static void can_start(struct can_periph *canp)
int can_transmit_frame(struct pprzcan_frame *txframe, struct pprzaddr_can *addr)
static THD_WORKING_AREA(wa_thd_spi1, SPI_THREAD_STACK_SIZE)
struct can_arch_periph can1_arch_s
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.