Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
link_mcu_can.c File Reference
#include "link_mcu_can.h"
#include "mcu_periph/can.h"
#include "led.h"
#include "subsystems/commands.h"
+ Include dependency graph for link_mcu_can.c:

Go to the source code of this file.

Macros

#define MSG_INTERMCU_COMMAND_MASTER_ID   0x01
 
#define MSG_INTERMCU_COMMAND_EXTRA_ID   0x02
 
#define MSG_INTERMCU_RADIO_LOW_ID   0x04
 
#define MSG_INTERMCU_RADIO_HIGH_ID   0x05
 
#define MSG_INTERMCU_TRIM_ID   0x09
 
#define MSG_INTERMCU_FBW_STATUS_ID   0x10
 
#define INTERMCU_COMMAND(_intermcu_payload, nr)   (pprz_t)((uint16_t)(*((uint8_t*)_intermcu_payload+0+(2*(nr)))|*((uint8_t*)_intermcu_payload+1+(2*(nr)))<<8))
 

Functions

void link_mcu_on_can_msg (uint32_t id, uint8_t *data, int len)
 
void link_mcu_init (void)
 
void link_mcu_event_task (void)
 

Variables

union {
uint8_t data [8]
 
pprz_t cmd [4]
 
imcu_cmd_mstr
 
union {
uint8_t data [8]
 
pprz_t cmd [4]
 
imcu_cmd_ext
 
union {
uint8_t data [8]
 
pprz_t cmd [4]
 
imcu_chan1
 
union {
uint8_t data [8]
 
pprz_t cmd [4]
 
imcu_chan2
 
union {
uint8_t data [8]
 
pprz_t cmd [4]
 
imcu_trim
 
struct link_mcu_msg link_mcu_from_ap_msg
 
struct link_mcu_msg link_mcu_from_fbw_msg
 

Macro Definition Documentation

#define INTERMCU_COMMAND (   _intermcu_payload,
  nr 
)    (pprz_t)((uint16_t)(*((uint8_t*)_intermcu_payload+0+(2*(nr)))|*((uint8_t*)_intermcu_payload+1+(2*(nr)))<<8))

Definition at line 50 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_COMMAND_EXTRA_ID   0x02

Definition at line 35 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_COMMAND_MASTER_ID   0x01

Definition at line 34 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_FBW_STATUS_ID   0x10

Definition at line 42 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_RADIO_HIGH_ID   0x05

Definition at line 38 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_RADIO_LOW_ID   0x04

Definition at line 37 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

#define MSG_INTERMCU_TRIM_ID   0x09

Definition at line 40 of file link_mcu_can.c.

Referenced by link_mcu_on_can_msg().

Function Documentation

void link_mcu_event_task ( void  )

Definition at line 227 of file link_mcu_can.c.

Referenced by event_task_ap().

+ Here is the caller graph for this function:

void link_mcu_init ( void  )

Definition at line 214 of file link_mcu_can.c.

Referenced by init_ap(), and init_fbw().

+ Here is the caller graph for this function:

Variable Documentation

union { ... } imcu_chan1
union { ... } imcu_chan2
union { ... } imcu_cmd_ext
union { ... } imcu_cmd_mstr
union { ... } imcu_trim
struct link_mcu_msg link_mcu_from_ap_msg

Definition at line 175 of file link_mcu_can.c.

struct link_mcu_msg link_mcu_from_fbw_msg

Definition at line 176 of file link_mcu_can.c.