Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
mavlink.h File Reference

Basic MAVLink datalink implementation. More...

#include <mavlink/mavlink_types.h>
#include "mcu_periph/uart.h"
#include <stdio.h>
+ Include dependency graph for mavlink.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
#define MAVLINK_ALIGNED_FIELDS   0
 
#define MAVLINK_DEBUG(...)   {}
 
#define MAVLINK_DEV   uart1
 
#define MAVLinkDev   (&(MAVLINK_DEV).device)
 
#define MAVLinkTransmit(c)   MAVLinkDev->put_byte(MAVLinkDev->periph, 0, c)
 
#define MAVLinkChAvailable()   MAVLinkDev->char_available(MAVLinkDev->periph)
 
#define MAVLinkGetch()   MAVLinkDev->get_byte(MAVLinkDev->periph)
 
#define MAVLinkSendMessage()   MAVLinkDev->send_message(MAVLinkDev->periph, 0)
 

Functions

void mavlink_init (void)
 Module functions. More...
 
void mavlink_periodic (void)
 Periodic MAVLink calls. More...
 
void mavlink_periodic_telemetry (void)
 Send periodic mavlink messages as defined in Mavlink process of telemetry xml file. More...
 
void mavlink_event (void)
 Event MAVLink calls. More...
 
static void comm_send_ch (mavlink_channel_t chan, uint8_t ch)
 Send one char (uint8_t) over a comm channel. More...
 

Variables

mavlink_system_t mavlink_system
 

Detailed Description

Basic MAVLink datalink implementation.

Definition in file mavlink.h.

Macro Definition Documentation

◆ MAVLINK_ALIGNED_FIELDS

#define MAVLINK_ALIGNED_FIELDS   0

Definition at line 31 of file mavlink.h.

◆ MAVLINK_DEBUG

#define MAVLINK_DEBUG (   ...)    {}

Definition at line 44 of file mavlink.h.

◆ MAVLINK_DEV

#define MAVLINK_DEV   uart1

Definition at line 57 of file mavlink.h.

◆ MAVLINK_USE_CONVENIENCE_FUNCTIONS

#define MAVLINK_USE_CONVENIENCE_FUNCTIONS

Definition at line 30 of file mavlink.h.

◆ MAVLinkChAvailable

#define MAVLinkChAvailable ( )    MAVLinkDev->char_available(MAVLinkDev->periph)

Definition at line 65 of file mavlink.h.

◆ MAVLinkDev

#define MAVLinkDev   (&(MAVLINK_DEV).device)

Definition at line 63 of file mavlink.h.

◆ MAVLinkGetch

#define MAVLinkGetch ( )    MAVLinkDev->get_byte(MAVLinkDev->periph)

Definition at line 66 of file mavlink.h.

◆ MAVLinkSendMessage

#define MAVLinkSendMessage ( )    MAVLinkDev->send_message(MAVLinkDev->periph, 0)

Definition at line 67 of file mavlink.h.

◆ MAVLinkTransmit

#define MAVLinkTransmit (   c)    MAVLinkDev->put_byte(MAVLinkDev->periph, 0, c)

Definition at line 64 of file mavlink.h.

Function Documentation

◆ comm_send_ch()

static void comm_send_ch ( mavlink_channel_t  chan,
uint8_t  ch 
)
inlinestatic

Send one char (uint8_t) over a comm channel.

Parameters
chanMAVLink channel to use, usually MAVLINK_COMM_0 = UART0
chCharacter to send

Definition at line 83 of file mavlink.h.

References MAVLinkTransmit.

◆ mavlink_event()

void mavlink_event ( void  )

Event MAVLink calls.

Definition at line 205 of file mavlink.c.

References mavlink_common_message_handler(), mavlink_mission_message_handler(), MAVLinkChAvailable, MAVLinkGetch, msg, and status.

+ Here is the call graph for this function:

◆ mavlink_init()

◆ mavlink_periodic()

◆ mavlink_periodic_telemetry()

void mavlink_periodic_telemetry ( void  )

Send periodic mavlink messages as defined in Mavlink process of telemetry xml file.

Called at TELEMETRY_FREQUENCY

Definition at line 138 of file mavlink.c.

Variable Documentation

◆ mavlink_system

mavlink_system_t mavlink_system

Definition at line 64 of file mavlink.c.