Paparazzi UAS  v5.15_devel-164-g81d4ceb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
syslink.c File Reference

Syslink protocol for communication with bitcraze/crazyflie NRF mcu. More...

#include "syslink.h"
+ Include dependency graph for syslink.c:

Go to the source code of this file.

Functions

void syslink_parse_init (syslink_parse_state *state)
 Init syslink parser. More...
 
bool syslink_parse_char (syslink_parse_state *state, uint8_t c, syslink_message_t *msg)
 Parse one byte. More...
 
void syslink_compute_cksum (syslink_message_t *msg)
 Compute syslink checksum. More...
 

Variables

const char * syslink_stx = "\xbc\xcf"
 

Detailed Description

Syslink protocol for communication with bitcraze/crazyflie NRF mcu.

based on PX4 implementation

Definition in file syslink.c.

Function Documentation

void syslink_compute_cksum ( syslink_message_t msg)

Compute syslink checksum.

Parameters
msgpointer to message structure

Definition at line 112 of file syslink.c.

References syslink_message_t::cksum, and syslink_message_t::length.

Referenced by send_message(), and syslink_parse_char().

+ Here is the caller graph for this function:

bool syslink_parse_char ( syslink_parse_state state,
uint8_t  c,
syslink_message_t msg 
)

Parse one byte.

Parameters
statepointer to state structure
cnext byte to parse
msgpointer to message structure
Returns
true if a full message was parsed

Definition at line 39 of file syslink.c.

References syslink_message_t::cksum, syslink_message_t::data, syslink_parse_state::index, syslink_message_t::length, syslink_parse_state::state, syslink_compute_cksum(), SYSLINK_MAX_DATA_LEN, SYSLINK_STATE_CKSUM, SYSLINK_STATE_DATA, SYSLINK_STATE_LENGTH, SYSLINK_STATE_START, SYSLINK_STATE_TYPE, syslink_stx, and syslink_message_t::type.

Referenced by syslink_dl_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void syslink_parse_init ( syslink_parse_state state)

Init syslink parser.

Parameters
statepointer to state structure

Definition at line 33 of file syslink.c.

References syslink_parse_state::index, syslink_parse_state::state, and SYSLINK_STATE_START.

Referenced by syslink_dl_init().

+ Here is the caller graph for this function:

Variable Documentation

const char* syslink_stx = "\xbc\xcf"

Definition at line 31 of file syslink.c.

Referenced by send_message(), and syslink_parse_char().