Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
arch independent UDP API More...
#include "mcu_periph/udp.h"
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... | |
arch independent UDP API
Definition in file udp.c.
bool_t udp_check_free_space | ( | struct udp_periph * | p, |
uint8_t | len | ||
) |
Check if there is enough free space in the transmit buffer.
p | pointer to UDP peripheral |
len | how many bytes of free space to check for |
Definition at line 80 of file udp.c.
References udp_periph::tx_insert_idx, and UDP_TX_BUFFER_SIZE.
Referenced by udp_periph_init().
void udp_periph_init | ( | struct udp_periph * | p, |
char * | host, | ||
int | port_out, | ||
int | port_in, | ||
bool_t | broadcast | ||
) |
Initialize the UDP peripheral.
Definition at line 58 of file udp.c.
References link_device::char_available, link_device::check_free_space, udp_periph::device, link_device::get_byte, link_device::periph, link_device::put_byte, udp_periph::rx_extract_idx, udp_periph::rx_insert_idx, link_device::send_message, udp_periph::tx_insert_idx, udp_arch_periph_init(), udp_char_available(), udp_check_free_space(), udp_getch(), udp_put_byte(), and udp_send_message().
void udp_put_byte | ( | struct udp_periph * | p, |
uint8_t | data | ||
) |
Add one data byte to the tx buffer.
p | pointer to UDP peripheral |
data | byte 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().