|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "mcu_periph/can_arch.h"#include "mcu_periph/can.h"#include "mcu_periph/sys_time.h"#include "stdio.h"#include "string.h"#include <ch.h>#include <hal.h>Go to the source code of this file.
Data Structures | |
| struct | can_arch_periph |
Macros | |
| #define | USE_FDCAN_DRIVER ((STM32_CAN_USE_FDCAN1) || (STM32_CAN_USE_FDCAN2) || (STM32_CAN_USE_FDCAN3)) |
Functions | |
| static void | can_thd_rx (void *arg) |
| static void | can_start (struct can_periph *canp) |
| static bool | canConfigureIface (struct can_arch_periph *cas) |
| Try to compute the timing registers for the can interface and set the configuration. | |
| void | can_hw_init () |
| int | can_transmit_frame (struct pprzcan_frame *txframe, struct pprzaddr_can *addr) |
| struct can_arch_periph |
Definition at line 26 of file can_arch.c.
| Data Fields | ||
|---|---|---|
| uint32_t | can_baudrate | |
| CANDriver * | cand | |
| CANConfig | cfg | |
| int | if_index | |
| void * | thread_rx_wa | |
| size_t | thread_rx_wa_size | |
| #define USE_FDCAN_DRIVER ((STM32_CAN_USE_FDCAN1) || (STM32_CAN_USE_FDCAN2) || (STM32_CAN_USE_FDCAN3)) |
Definition at line 24 of file can_arch.c.
| void can_hw_init | ( | void | ) |
Definition at line 66 of file can_arch.c.
References can_start().
Referenced by can_init().
|
static |
Definition at line 208 of file can_arch.c.
References can_periph::arch_struct, can_thd_rx(), canConfigureIface(), can_arch_periph::cand, can_arch_periph::cfg, can_arch_periph::thread_rx_wa, and can_arch_periph::thread_rx_wa_size.
Referenced by can_hw_init().
|
static |
Definition at line 80 of file can_arch.c.
References can_periph::arch_struct, can_periph::callback_user_data, can_periph::callbacks, can_dlc_to_len(), CAN_FRAME_EFF, CAN_FRAME_ERR, CAN_FRAME_RTR, CAN_NB_CALLBACKS_MAX, can_arch_periph::cand, CANFD_ESI, CANFD_FDF, pprzcan_frame::data, pprzcan_frame::flags, can_arch_periph::if_index, pprzcan_frame::len, can_periph::nb_errors, and status.
Referenced by can_start().
| int can_transmit_frame | ( | struct pprzcan_frame * | txframe, |
| struct pprzaddr_can * | addr ) |
Definition at line 159 of file can_arch.c.
References CAN_EID_MASK, CAN_FRAME_EFF, CAN_FRAME_RTR, pprzcan_frame::can_id, pprzaddr_can::can_ifindex, can_len_to_dlc(), CAN_SID_MASK, pprzcan_frame::data, frame, and pprzcan_frame::len.
Referenced by slcan_handle_frame(), and uavcan_tx().
|
static |
Try to compute the timing registers for the can interface and set the configuration.
Definition at line 225 of file can_arch.c.
References can_arch_periph::can_baudrate, and can_arch_periph::cfg.
Referenced by can_start().