![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/core/slcan.h"
#include "generated/airframe.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/can.h"
#include "mcu_periph/usb_serial.h"
#include "pprzlink/pprzlink_device.h"
#include "stdio.h"
#include "string.h"
Go to the source code of this file.
Functions | |
static void | slcan_handle_cmd (slcan_t *slcan) |
static void | slcan_rsp_ok (slcan_t *slcan) |
static void | slcan_rsp_error (slcan_t *slcan) |
static int | slcan_handle_frame (slcan_t *slcan) |
static uint8_t | hex2nibble (char a) |
hex2nibble('B') = 0x0B | |
static uint8_t | nibble2hex (uint8_t x) |
nibble2hex(2) == '2' | |
void | slcan_can_rx_cb (struct pprzcan_frame *rxframe, struct pprzaddr_can *src_addr, void *user_data) |
void | slcan_init (void) |
void | slcan_event (void) |
static uint8_t | slcan_cmd_from_id (uint32_t can_id, uint8_t flags) |
Variables | |
slcan_t | slcan |
Definition in file slcan.c.
hex2nibble('B') = 0x0B
Definition at line 298 of file slcan.c.
Referenced by slcan_handle_frame().
nibble2hex(2) == '2'
Definition at line 288 of file slcan.c.
References foo.
Referenced by slcan_can_rx_cb().
void slcan_can_rx_cb | ( | struct pprzcan_frame * | rxframe, |
struct pprzaddr_can * | src_addr, | ||
void * | user_data | ||
) |
Definition at line 233 of file slcan.c.
References CAN_FRAME_EFF, pprzcan_frame::can_id, can_len_to_dlc(), pprzcan_frame::data, slcan_t::dev, pprzcan_frame::flags, foo, idx, pprzcan_frame::len, slcan_t::mtx, nibble2hex(), pprz_mtx_lock(), pprz_mtx_unlock(), slcan, slcan_cmd_from_id(), pprzcan_frame::timestamp, slcan_t::timestamp, and slcan_t::tx_buf.
Referenced by slcan_init().
Definition at line 209 of file slcan.c.
References CAN_FRAME_EFF, CAN_FRAME_RTR, pprzcan_frame::can_id, CANFD_FDF, and pprzcan_frame::flags.
Referenced by slcan_can_rx_cb().
Definition at line 63 of file slcan.c.
References b, slcan_t::cmd_buf, slcan_t::cmd_buf_idx, slcan_t::dev, slcan, SLCAN_CMD_BUF_LEN, and slcan_handle_cmd().
Definition at line 76 of file slcan.c.
References slcan_t::cmd_buf, slcan_t::cmd_buf_idx, slcan_t::dev, foo, slcan, slcan_handle_frame(), slcan_rsp_error(), slcan_rsp_ok(), status, and slcan_t::timestamp.
Referenced by slcan_event().
Definition at line 159 of file slcan.c.
References can_dlc_to_len(), CAN_FRAME_EFF, CAN_FRAME_RTR, pprzcan_frame::can_id, slcan_t::can_if, can_transmit_frame(), slcan_t::cmd_buf, slcan_t::cmd_buf_idx, pprzcan_frame::data, foo, hex2nibble(), and slcan.
Referenced by slcan_handle_cmd().
Definition at line 53 of file slcan.c.
References slcan_t::can_if, pprzaddr_can::can_ifindex, can_register_callback(), slcan_t::cmd_buf_idx, slcan_t::dev, foo, slcan_t::mtx, pprz_mtx_init(), slcan, slcan_can_rx_cb(), and slcan_t::timestamp.
Definition at line 280 of file slcan.c.
References slcan_t::dev, and slcan.
Referenced by slcan_handle_cmd().
Definition at line 275 of file slcan.c.
References slcan_t::dev, and slcan.
Referenced by slcan_handle_cmd().
slcan_t slcan |
Definition at line 38 of file slcan.c.
Referenced by slcan_can_rx_cb(), slcan_event(), slcan_handle_cmd(), slcan_handle_frame(), slcan_init(), slcan_rsp_error(), and slcan_rsp_ok().