Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_sbus.c File Reference

Sbus actuator driver, which can output as 7 sbus channels at ~11ms. More...

#include "modules/actuators/actuators.h"
#include "modules/actuators/actuators_sbus.h"
#include "generated/airframe.h"
#include "mcu_periph/uart.h"
+ Include dependency graph for actuators_sbus.c:

Go to the source code of this file.

Macros

#define SBUS_START_BYTE   0x0f
 
#define SBUS_END_BYTE   0x00
 
#define SBUS_BIT_PER_CHANNEL   11
 

Functions

static void actuators_sbus_send (struct link_device *dev)
 
void actuators_sbus_init (void)
 
void actuators_sbus_set (void)
 

Variables

struct ActuatorsSbus actuators_sbus
 

Detailed Description

Sbus actuator driver, which can output as 7 sbus channels at ~11ms.

Channels min, averga and maximum should be: 340, 1024, 1708

Definition in file actuators_sbus.c.

Macro Definition Documentation

◆ SBUS_BIT_PER_CHANNEL

#define SBUS_BIT_PER_CHANNEL   11

Definition at line 89 of file actuators_sbus.c.

◆ SBUS_END_BYTE

#define SBUS_END_BYTE   0x00

Definition at line 87 of file actuators_sbus.c.

◆ SBUS_START_BYTE

#define SBUS_START_BYTE   0x0f

Definition at line 86 of file actuators_sbus.c.

Function Documentation

◆ actuators_sbus_init()

void actuators_sbus_init ( void  )

Definition at line 51 of file actuators_sbus.c.

References actuators_sbus, B100000, ActuatorsSbus::device, uart_periph_set_baudrate(), uart_periph_set_bits_stop_parity(), UBITS_8, UPARITY_EVEN, and USTOP_2.

+ Here is the call graph for this function:

◆ actuators_sbus_send()

static void actuators_sbus_send ( struct link_device *  dev)
inlinestatic

Definition at line 91 of file actuators_sbus.c.

References actuators_sbus, ACTUATORS_SBUS_MAX_NB, ActuatorsSbus::cmds, dev, SBUS_BIT_PER_CHANNEL, SBUS_END_BYTE, and SBUS_START_BYTE.

Referenced by actuators_sbus_set().

+ Here is the caller graph for this function:

◆ actuators_sbus_set()

void actuators_sbus_set ( void  )

Definition at line 62 of file actuators_sbus.c.

References actuators_sbus, actuators_sbus_send(), and ActuatorsSbus::device.

+ Here is the call graph for this function:

Variable Documentation

◆ actuators_sbus

struct ActuatorsSbus actuators_sbus

Definition at line 1 of file actuators_sbus.c.

Referenced by actuators_sbus_init(), actuators_sbus_send(), and actuators_sbus_set().