Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ datalink_frsky_x_init()

◆ fifo_avail()

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:

◆ fifo_free()

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:

◆ fifo_get()

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:

◆ fifo_init()

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:

◆ fifo_put()

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, if(), fifo_t::size, and fifo_t::tail.

Referenced by frsky_x_serial_put_byte(), and smartPortUplink_cb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frsky_x_serial_char_available()

static int frsky_x_serial_char_available ( void *  p)
static

Definition at line 117 of file frsky_x.c.

References fifo_avail(), p, 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:

◆ frsky_x_serial_check_free_space()

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, fd, fifo_free(), p, and true.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frsky_x_serial_get_byte()

static uint8_t frsky_x_serial_get_byte ( void *  p)
static

Definition at line 121 of file frsky_x.c.

References byte, fifo_get(), p, 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:

◆ frsky_x_serial_put_buffer()

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 fd, frsky_x_serial_put_byte(), and p.

Referenced by datalink_frsky_x_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frsky_x_serial_put_byte()

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, fd, fifo_put(), and p.

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:

◆ frsky_x_serial_send_message()

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

Definition at line 111 of file frsky_x.c.

References fd, and p.

Referenced by datalink_frsky_x_init().

+ Here is the caller graph for this function:

◆ smartPortDownlink_cb()

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:

◆ smartPortUplink_cb()

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

◆ frsky_x_serial

struct frsky_x_serial_periph frsky_x_serial

Definition at line 1 of file frsky_x.c.

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