Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Syslink protocol for communication with bitcraze/crazyflie NRF mcu. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | syslink_parse_state |
Macros | |
#define | SYSLINK_GROUP 0xF0 |
#define | SYSLINK_RADIO 0x00 |
#define | SYSLINK_RADIO_RAW 0x00 |
#define | SYSLINK_RADIO_CHANNEL 0x01 |
#define | SYSLINK_RADIO_DATARATE 0x02 |
#define | SYSLINK_RADIO_CONTWAVE 0x03 |
#define | SYSLINK_RADIO_RSSI 0x04 |
#define | SYSLINK_RADIO_ADDRESS 0x05 |
#define | SYSLINK_PM 0x10 |
#define | SYSLINK_PM_SOURCE 0x10 |
#define | SYSLINK_PM_ONOFF_SWITCHOFF 0x11 |
#define | SYSLINK_PM_BATTERY_VOLTAGE 0x12 |
#define | SYSLINK_PM_BATTERY_STATE 0x13 |
#define | SYSLINK_PM_BATTERY_AUTOUPDATE 0x14 |
#define | SYSLINK_OW 0x20 |
#define | SYSLINK_OW_SCAN 0x20 |
#define | SYSLINK_OW_GETINFO 0x21 |
#define | SYSLINK_OW_READ 0x22 |
#define | SYSLINK_OW_WRITE 0x23 |
#define | SYSLINK_MAX_DATA_LEN 32 |
#define | SYSLINK_RADIO_RATE_250K 0 |
#define | SYSLINK_RADIO_RATE_1M 1 |
#define | SYSLINK_RADIO_RATE_2M 2 |
Enumerations | |
enum | syslink_state_t { SYSLINK_STATE_START = 0 , SYSLINK_STATE_TYPE , SYSLINK_STATE_LENGTH , SYSLINK_STATE_DATA , SYSLINK_STATE_CKSUM } |
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 |
Syslink protocol for communication with bitcraze/crazyflie NRF mcu.
based on PX4 implementation
Definition in file syslink.h.
struct syslink_message_t |
struct syslink_parse_state |
Data Fields | ||
---|---|---|
int | index | |
syslink_state_t | state |
enum syslink_state_t |
void syslink_compute_cksum | ( | syslink_message_t * | msg | ) |
Compute syslink checksum.
msg | pointer to message structure |
Definition at line 112 of file syslink.c.
Referenced by send_message(), and syslink_parse_char().
bool syslink_parse_char | ( | syslink_parse_state * | state, |
uint8_t | c, | ||
syslink_message_t * | msg | ||
) |
Parse one byte.
state | pointer to state structure |
c | next byte to parse |
msg | pointer to message structure |
Definition at line 39 of file syslink.c.
References msg, state, syslink_compute_cksum(), SYSLINK_MAX_DATA_LEN, SYSLINK_STATE_CKSUM, SYSLINK_STATE_DATA, SYSLINK_STATE_LENGTH, SYSLINK_STATE_START, SYSLINK_STATE_TYPE, and syslink_stx.
Referenced by syslink_dl_event().
void syslink_parse_init | ( | syslink_parse_state * | state | ) |
Init syslink parser.
state | pointer to state structure |
Definition at line 33 of file syslink.c.
References state, and SYSLINK_STATE_START.
Referenced by syslink_dl_init().
|
extern |
Definition at line 31 of file syslink.c.
Referenced by send_message(), and syslink_parse_char().