Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
frsky_x.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Tom van Dijk <tomvand@users.noreply.github.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef DATALINK_FRSKY_X_H
23 #define DATALINK_FRSKY_X_H
24 
25 #include "pprzlink/pprzlink_device.h"
26 
27 #define DOWNLINK_BUFFER_SIZE 512
28 #define UPLINK_BUFFER_SIZE 512
29 
30 typedef struct {
31  int head;
32  int tail;
33  uint8_t *buf;
34  size_t size;
35 } fifo_t;
36 
39  struct link_device device;
40  /* Downlink fifo */
43  /* Uplink fifo */
46 };
48 
49 void datalink_frsky_x_init(void);
50 
51 #endif // DATALINK_FRSKY_X_H
frsky_x_serial_periph
Definition: frsky_x.h:37
UPLINK_BUFFER_SIZE
#define UPLINK_BUFFER_SIZE
Definition: frsky_x.h:28
datalink_frsky_x_init
void datalink_frsky_x_init(void)
Definition: frsky_x.c:156
frsky_x_serial_periph::downlink_fifo
fifo_t downlink_fifo
Definition: frsky_x.h:41
DOWNLINK_BUFFER_SIZE
#define DOWNLINK_BUFFER_SIZE
Definition: frsky_x.h:27
uint8_t
unsigned char uint8_t
Definition: types.h:14
fifo_t
Definition: usb_ser_hw.c:90
frsky_x_serial_periph::uplink_fifo
fifo_t uplink_fifo
Definition: frsky_x.h:44
frsky_x_serial
struct frsky_x_serial_periph frsky_x_serial
Definition: frsky_x.c:27
frsky_x_serial_periph::uplink_buf
uint8_t uplink_buf[UPLINK_BUFFER_SIZE]
Definition: frsky_x.h:45
fifo_t::size
size_t size
Definition: frsky_x.h:34
frsky_x_serial_periph::downlink_buf
uint8_t downlink_buf[DOWNLINK_BUFFER_SIZE]
Definition: frsky_x.h:42
frsky_x_serial_periph::device
struct link_device device
Generic device interface.
Definition: frsky_x.h:39