Paparazzi UAS  v5.17_devel-24-g2ae834f
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
uint8_t downlink_buf[DOWNLINK_BUFFER_SIZE]
Definition: frsky_x.h:42
uint8_t uplink_buf[UPLINK_BUFFER_SIZE]
Definition: frsky_x.h:45
struct link_device device
Generic device interface.
Definition: frsky_x.h:39
struct frsky_x_serial_periph frsky_x_serial
Definition: frsky_x.c:27
#define UPLINK_BUFFER_SIZE
Definition: frsky_x.h:28
size_t size
Definition: frsky_x.h:34
void datalink_frsky_x_init(void)
Definition: frsky_x.c:156
unsigned char uint8_t
Definition: types.h:14
#define DOWNLINK_BUFFER_SIZE
Definition: frsky_x.h:27
fifo_t downlink_fifo
Definition: frsky_x.h:41