Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
RC_SBUS Class Reference

#include <rc_sbus.h>

Inheritance diagram for RC_SBUS:
Inheritance graph
[legend]

Classes

struct  dataFrame_s
 
union  SBUS_t
 

Public Member Functions

uint32_t get_errors ()
 
void init (GPIO *inv_pin, UART *uart)
 
bool lost ()
 
float read (uint8_t channel)
 
void read_cb (uint8_t byte)
 

Private Types

enum  { START_BYTE = 0x0F, END_BYTE = 0x00 }
 
enum  failsafe_state_t { SBUS_SIGNAL_OK, SBUS_SIGNAL_LOST, SBUS_SIGNAL_FAILSAFE }
 

Private Member Functions

struct RC_SBUS::dataFrame_s __attribute__ ((__packed__))
 
void decode_buffer ()
 

Private Attributes

typedef __attribute__
 
uint8_t buffer_ [25]
 
uint8_t buffer_pos_ = 0
 
uint32_t errors_ = 0
 
failsafe_state_t failsafe_status_
 
uint32_t frame_start_ms_ = 0
 
bool frame_started_ = false
 
GPIOinv_pin_
 
uint8_t prev_byte_ = 0
 
uint32_t raw_ [18]
 
SBUS_t sbus_union_
 
UARTuart_
 

Detailed Description

Definition at line 40 of file rc_sbus.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
START_BYTE 
END_BYTE 

Definition at line 43 of file rc_sbus.h.

Enumerator
SBUS_SIGNAL_OK 
SBUS_SIGNAL_LOST 
SBUS_SIGNAL_FAILSAFE 

Definition at line 49 of file rc_sbus.h.

Member Function Documentation

struct RC_SBUS::dataFrame_s RC_SBUS::__attribute__ ( (__packed__)  )
private
void RC_SBUS::decode_buffer ( )
private

Definition at line 67 of file rc_sbus.cpp.

uint32_t RC_SBUS::get_errors ( )
inline

Definition at line 106 of file rc_sbus.h.

void RC_SBUS::init ( GPIO inv_pin,
UART uart 
)

Definition at line 42 of file rc_sbus.cpp.

bool RC_SBUS::lost ( )
virtual

Implements RC_BASE.

Definition at line 62 of file rc_sbus.cpp.

float RC_SBUS::read ( uint8_t  channel)
virtual

Implements RC_BASE.

Definition at line 57 of file rc_sbus.cpp.

void RC_SBUS::read_cb ( uint8_t  byte)

Definition at line 109 of file rc_sbus.cpp.

Member Data Documentation

typedef RC_SBUS::__attribute__
private
uint8_t RC_SBUS::buffer_[25]
private

Definition at line 93 of file rc_sbus.h.

uint8_t RC_SBUS::buffer_pos_ = 0
private

Definition at line 94 of file rc_sbus.h.

uint32_t RC_SBUS::errors_ = 0
private

Definition at line 95 of file rc_sbus.h.

failsafe_state_t RC_SBUS::failsafe_status_
private

Definition at line 87 of file rc_sbus.h.

uint32_t RC_SBUS::frame_start_ms_ = 0
private

Definition at line 92 of file rc_sbus.h.

bool RC_SBUS::frame_started_ = false
private

Definition at line 97 of file rc_sbus.h.

GPIO* RC_SBUS::inv_pin_
private

Definition at line 89 of file rc_sbus.h.

uint8_t RC_SBUS::prev_byte_ = 0
private

Definition at line 96 of file rc_sbus.h.

uint32_t RC_SBUS::raw_[18]
private

Definition at line 91 of file rc_sbus.h.

SBUS_t RC_SBUS::sbus_union_
private

Definition at line 85 of file rc_sbus.h.

UART* RC_SBUS::uart_
private

Definition at line 90 of file rc_sbus.h.


The documentation for this class was generated from the following files:


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Fri Jul 24 2020 03:20:15