|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"#include "mcu_periph/can_arch.h"
Include dependency graph for can.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | pprzcan_frame |
| struct | pprzaddr_can |
| struct | can_periph |
Macros | |
| #define | CAN_FD_MODE TRUE |
| #define | SOCKETCAN_MAX_DLEN 64U |
| #define | CAN_NB_CALLBACKS_MAX 10 |
| #define | CAN_FRAME_ERR (1<<29) |
| #define | CAN_FRAME_RTR (1<<30) |
| #define | CAN_FRAME_EFF (1<<31) |
| #define | CAN_EID_MASK 0x1FFFFFFF |
| #define | CAN_SID_MASK 0x7FF |
| #define | CANFD_BRS 0x01 |
| #define | CANFD_ESI 0x02 |
| #define | CANFD_FDF 0x04 |
Typedefs | |
| typedef uint32_t | socketcan_id_t |
| typedef void(* | can_rx_frame_callback_t) (struct pprzcan_frame *rxframe, struct pprzaddr_can *src_addr, void *user_data) |
Functions | |
| void | can_init (void) |
| int | can_register_callback (can_rx_frame_callback_t callback, struct pprzaddr_can *src_addr, void *user_data) |
| Add a callback on received frames from an interface. | |
| int | can_transmit_frame (struct pprzcan_frame *txframe, struct pprzaddr_can *dst_addr) |
| uint8_t | can_dlc_to_len (uint8_t dlc) |
| uint8_t | can_len_to_dlc (uint8_t len) |
| struct pprzcan_frame |
| Data Fields | ||
|---|---|---|
| socketcan_id_t | can_id | |
| uint8_t | data[SOCKETCAN_MAX_DLEN] | |
| uint8_t | flags | |
| uint8_t | len | |
| uint32_t | timestamp | |
| struct can_periph |
Collaboration diagram for can_periph:| Data Fields | ||
|---|---|---|
| void * | arch_struct | |
| void * | callback_user_data[CAN_NB_CALLBACKS_MAX] | |
| can_rx_frame_callback_t | callbacks[CAN_NB_CALLBACKS_MAX] | |
| int | fd | |
| uint32_t | nb_errors | |
| typedef void(* can_rx_frame_callback_t) (struct pprzcan_frame *rxframe, struct pprzaddr_can *src_addr, void *user_data) |
Definition at line 49 of file can.c.
References dlc_to_len, and foo.
Referenced by __unsupported_isr(), can_thd_rx(), and slcan_handle_frame().
Here is the caller graph for this function:Definition at line 69 of file can.c.
References can_hw_init().
Referenced by can_hw_init(), and mcu_init().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 56 of file can.c.
References dlc_to_len.
Referenced by can_transmit_frame(), and slcan_can_rx_cb().
Here is the caller graph for this function:| int can_register_callback | ( | can_rx_frame_callback_t | callback, |
| struct pprzaddr_can * | src_addr, | ||
| void * | user_data | ||
| ) |
Add a callback on received frames from an interface.
| callback | The callback called on received frames |
| src_addr | Interface from which frames are received. 0 means all interfaces. |
| user_data | Pointer that will be passed in callback parameters |
Definition at line 88 of file can.c.
References add_can_callback(), and foo.
Referenced by slcan_init(), and uavcanInitIface().
Here is the call graph for this function:
Here is the caller graph for this function:| int can_transmit_frame | ( | struct pprzcan_frame * | txframe, |
| struct pprzaddr_can * | dst_addr | ||
| ) |
Definition at line 152 of file can_arch.c.
References can1_arch_s, CAN_EID_MASK, CAN_FRAME_EFF, CAN_FRAME_RTR, pprzaddr_can::can_ifindex, can_arch_periph::can_initialized, can_len_to_dlc(), CAN_SID_MASK, can_arch_periph::canport, foo, and frame.
Referenced by slcan_handle_frame(), and uavcan_tx().
Here is the call graph for this function:
Here is the caller graph for this function: