Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
udp.c File Reference

arch independent UDP API More...

#include "mcu_periph/udp.h"
+ Include dependency graph for udp.c:

Go to the source code of this file.

Functions

void udp_periph_init (struct udp_periph *p, char *host, int port_out, int port_in, bool_t broadcast)
 Initialize the UDP peripheral. More...
 
bool_t udp_check_free_space (struct udp_periph *p, uint8_t len)
 Check if there is enough free space in the transmit buffer. More...
 
void udp_put_byte (struct udp_periph *p, uint8_t data)
 Add one data byte to the tx buffer. More...
 

Detailed Description

arch independent UDP API

Definition in file udp.c.

Function Documentation

bool_t udp_check_free_space ( struct udp_periph p,
uint8_t  len 
)

Check if there is enough free space in the transmit buffer.

Parameters
ppointer to UDP peripheral
lenhow many bytes of free space to check for
Returns
TRUE if enough space for len bytes

Definition at line 80 of file udp.c.

References udp_periph::tx_insert_idx, and UDP_TX_BUFFER_SIZE.

Referenced by udp_periph_init().

+ Here is the caller graph for this function:

void udp_periph_init ( struct udp_periph p,
char *  host,
int  port_out,
int  port_in,
bool_t  broadcast 
)
void udp_put_byte ( struct udp_periph p,
uint8_t  data 
)

Add one data byte to the tx buffer.

Parameters
ppointer to UDP peripheral
databyte to add to tx buffer

Definition at line 90 of file udp.c.

References udp_periph::tx_buf, udp_periph::tx_insert_idx, and UDP_TX_BUFFER_SIZE.

Referenced by udp_periph_init().

+ Here is the caller graph for this function: