Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Parser for the XSens protocol. More...
#include "std.h"
#include "xsens_protocol.h"
Go to the source code of this file.
Data Structures | |
struct | XsensParser |
Macros | |
#define | XSENS_MAX_PAYLOAD 254 |
Includes macros generated from xsens_MTi-G.xml. More... | |
#define | UNINIT 0 |
#define | GOT_START 1 |
#define | GOT_BID 2 |
#define | GOT_MID 3 |
#define | GOT_LEN 4 |
#define | GOT_DATA 5 |
#define | GOT_CHECKSUM 6 |
#define | XsensLinkDevice (&((XSENS_LINK).device)) |
#define | XsensInitCheksum() { send_ck = 0; } |
#define | XsensUpdateChecksum(c) { send_ck += c; } |
#define | XsensUartSend1(c) XsensLinkDevice->put_byte(XsensLinkDevice->periph, 0, c) |
#define | XsensSend1(c) { uint8_t i8=c; XsensUartSend1(i8); XsensUpdateChecksum(i8); } |
#define | XsensSend1ByAddr(x) { XsensSend1(*x); } |
#define | XsensSend2ByAddr(x) { XsensSend1(*(x+1)); XsensSend1(*x); } |
#define | XsensSend4ByAddr(x) { XsensSend1(*(x+3)); XsensSend1(*(x+2)); XsensSend1(*(x+1)); XsensSend1(*x); } |
#define | XsensHeader(msg_id, len) |
#define | XsensTrailer() { uint8_t i8=0x100-send_ck; XsensUartSend1(i8); } |
Functions | |
void | xsens_parser_event (struct XsensParser *xsensparser) |
Variables | |
uint8_t | send_ck |
struct XsensParser |
Definition at line 46 of file xsens_parser.h.
Data Fields | ||
---|---|---|
uint8_t | ck | |
uint8_t | id | |
uint8_t | len | |
uint8_t | msg_buf[XSENS_MAX_PAYLOAD] | |
uint8_t | msg_idx | |
volatile uint8_t | msg_received | |
uint8_t | status |
#define GOT_BID 2 |
Definition at line 40 of file xsens_parser.h.
#define GOT_CHECKSUM 6 |
Definition at line 44 of file xsens_parser.h.
#define GOT_DATA 5 |
Definition at line 43 of file xsens_parser.h.
#define GOT_LEN 4 |
Definition at line 42 of file xsens_parser.h.
#define GOT_MID 3 |
Definition at line 41 of file xsens_parser.h.
#define GOT_START 1 |
Definition at line 39 of file xsens_parser.h.
#define UNINIT 0 |
Definition at line 38 of file xsens_parser.h.
#define XSENS_MAX_PAYLOAD 254 |
Includes macros generated from xsens_MTi-G.xml.
Definition at line 35 of file xsens_parser.h.
#define XsensHeader | ( | msg_id, | |
len | |||
) |
Definition at line 71 of file xsens_parser.h.
#define XsensInitCheksum | ( | ) | { send_ck = 0; } |
Definition at line 62 of file xsens_parser.h.
#define XsensLinkDevice (&((XSENS_LINK).device)) |
Definition at line 60 of file xsens_parser.h.
#define XsensSend1 | ( | c | ) | { uint8_t i8=c; XsensUartSend1(i8); XsensUpdateChecksum(i8); } |
Definition at line 66 of file xsens_parser.h.
#define XsensSend1ByAddr | ( | x | ) | { XsensSend1(*x); } |
Definition at line 67 of file xsens_parser.h.
#define XsensSend2ByAddr | ( | x | ) | { XsensSend1(*(x+1)); XsensSend1(*x); } |
Definition at line 68 of file xsens_parser.h.
#define XsensSend4ByAddr | ( | x | ) | { XsensSend1(*(x+3)); XsensSend1(*(x+2)); XsensSend1(*(x+1)); XsensSend1(*x); } |
Definition at line 69 of file xsens_parser.h.
#define XsensTrailer | ( | ) | { uint8_t i8=0x100-send_ck; XsensUartSend1(i8); } |
Definition at line 78 of file xsens_parser.h.
#define XsensUartSend1 | ( | c | ) | XsensLinkDevice->put_byte(XsensLinkDevice->periph, 0, c) |
Definition at line 65 of file xsens_parser.h.
#define XsensUpdateChecksum | ( | c | ) | { send_ck += c; } |
Definition at line 63 of file xsens_parser.h.
void xsens_parser_event | ( | struct XsensParser * | xsensparser | ) |
Definition at line 35 of file xsens_parser.c.
References dev, XsensParser::msg_received, and xsens_parser_func().
Referenced by imu_xsens_event(), ins_xsens700_event(), and ins_xsens_event().
|
extern |
Definition at line 31 of file xsens_parser.c.