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.c File Reference
+ Include dependency graph for frsky_x.c:

Go to the source code of this file.

Functions

static void fifo_init (fifo_t *fifo, uint8_t *buf, size_t size)
 
static bool fifo_put (fifo_t *fifo, uint8_t c)
 
static bool fifo_get (fifo_t *fifo, uint8_t *pc)
 
static int fifo_avail (fifo_t *fifo)
 
static int fifo_free (fifo_t *fifo)
 
static int frsky_x_serial_check_free_space (void *p, long *fd, uint16_t len)
 
static void frsky_x_serial_put_byte (void *p, long fd, uint8_t c)
 
static void frsky_x_serial_put_buffer (void *p, long fd, const uint8_t *data, uint16_t len)
 
static void frsky_x_serial_send_message (void *p, long fd)
 
static int frsky_x_serial_char_available (void *p)
 
static uint8_t frsky_x_serial_get_byte (void *p)
 
static bool smartPortDownlink_cb (uint32_t *data)
 
static void smartPortUplink_cb (smartPortPayload_t *payload)
 
void datalink_frsky_x_init (void)
 

Variables

struct frsky_x_serial_periph frsky_x_serial
 

Function Documentation

static int fifo_avail ( fifo_t fifo)
static

Definition at line 78 of file frsky_x.c.

References fifo_t::head, fifo_t::size, and fifo_t::tail.

Referenced by fifo_free(), frsky_x_serial_char_available(), and smartPortDownlink_cb().

+ Here is the caller graph for this function:

static int fifo_free ( fifo_t fifo)
static

Definition at line 82 of file frsky_x.c.

References fifo_avail(), and fifo_t::size.

Referenced by frsky_x_serial_check_free_space().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool fifo_get ( fifo_t fifo,
uint8_t pc 
)
static

Definition at line 62 of file frsky_x.c.

References fifo_t::buf, fifo_t::head, fifo_t::size, and fifo_t::tail.

Referenced by frsky_x_serial_get_byte(), and smartPortDownlink_cb().

+ Here is the caller graph for this function:

static void fifo_init ( fifo_t fifo,
uint8_t buf,
size_t  size 
)
static

Definition at line 39 of file frsky_x.c.

References fifo_t::buf, fifo_t::head, fifo_t::size, and fifo_t::tail.

Referenced by datalink_frsky_x_init().

+ Here is the caller graph for this function:

static bool fifo_put ( fifo_t fifo,
uint8_t  c 
)
static

Definition at line 46 of file frsky_x.c.

References fifo_t::buf, fifo_t::head, fifo_t::size, and fifo_t::tail.

Referenced by frsky_x_serial_put_byte(), and smartPortUplink_cb().

+ Here is the caller graph for this function:

static int frsky_x_serial_char_available ( void *  p)
static

Definition at line 117 of file frsky_x.c.

References fifo_avail(), and frsky_x_serial_periph::uplink_fifo.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int frsky_x_serial_check_free_space ( void *  p,
long *  fd,
uint16_t  len 
)
static

Definition at line 95 of file frsky_x.c.

References frsky_x_serial_periph::downlink_fifo, and fifo_free().

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint8_t frsky_x_serial_get_byte ( void *  p)
static

Definition at line 121 of file frsky_x.c.

References byte, fifo_get(), and frsky_x_serial_periph::uplink_fifo.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void frsky_x_serial_put_buffer ( void *  p,
long  fd,
const uint8_t data,
uint16_t  len 
)
static

Definition at line 105 of file frsky_x.c.

References frsky_x_serial_put_byte().

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void frsky_x_serial_put_byte ( void *  p,
long  fd,
uint8_t  c 
)
static

Definition at line 100 of file frsky_x.c.

References frsky_x_serial_periph::downlink_fifo, and fifo_put().

Referenced by datalink_frsky_x_init(), and frsky_x_serial_put_buffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void frsky_x_serial_send_message ( void *  p,
long  fd 
)
static

Definition at line 111 of file frsky_x.c.

Referenced by datalink_frsky_x_init().

+ Here is the caller graph for this function:

static bool smartPortDownlink_cb ( uint32_t data)
static

Definition at line 129 of file frsky_x.c.

References frsky_x_serial_periph::downlink_fifo, fifo_avail(), fifo_get(), and frsky_x_serial.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void smartPortUplink_cb ( smartPortPayload_t payload)
static

Definition at line 147 of file frsky_x.c.

References smartPortPayload_s::data, fifo_put(), smartPortPayload_s::frameId, frsky_x_serial, and frsky_x_serial_periph::uplink_fifo.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct frsky_x_serial_periph frsky_x_serial

Definition at line 27 of file frsky_x.c.

Referenced by datalink_frsky_x_init(), smartPortDownlink_cb(), and smartPortUplink_cb().