14#include "mcu_periph/can_arch.h"
16#include "mcu_periph/sys_time_arch.h"
46 .can_baudrate = 1000000U,
61 .can_baudrate = 1000000U,
97 if(rx_frame.common.XTD) {
100 id = rx_frame.std.SID;
102 if(rx_frame.common.RTR) {
105 if(rx_frame.common.ESI) {
119 if(rx_frame.common.ESI) {
141 frame.common.RTR = 1;
144 frame.common.XTD = 1;
175 #if defined(STM32_CAN_USE_FDCAN1) || defined(STM32_CAN_USE_FDCAN2)
199 if (
cas->can_baudrate < 1) {
204#if defined(STM32_CAN_USE_FDCAN1) || defined(STM32_CAN_USE_FDCAN2)
209 static const int MaxBS1 = 16;
210 static const int MaxBS2 = 8;
248 if ((prescaler < 1U) || (prescaler > 1024U)) {
297#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)
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
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.