Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
arch independent UDP API More...
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 broadcast) |
Initialize the UDP peripheral. More... | |
int WEAK | udp_check_free_space (struct udp_periph *p, long *fd, uint16_t len) |
Check if there is enough free space in the transmit buffer. More... | |
void WEAK | udp_put_byte (struct udp_periph *p, long fd, uint8_t data) |
Add one data byte to the tx buffer. More... | |
void WEAK | udp_put_buffer (struct udp_periph *p, long fd, const uint8_t *data, uint16_t len) |
arch independent UDP API
Definition in file udp.c.
int WEAK udp_check_free_space | ( | struct udp_periph * | p, |
long * | fd, | ||
uint16_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 83 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 | broadcast | ||
) |
Initialize the UDP peripheral.
Definition at line 60 of file udp.c.
References udp_periph::device, udp_periph::rx_extract_idx, udp_periph::rx_insert_idx, udp_periph::tx_insert_idx, udp_arch_periph_init(), udp_char_available(), udp_check_free_space(), udp_getch(), udp_put_buffer(), udp_put_byte(), and udp_send_message().
void WEAK udp_put_buffer | ( | struct udp_periph * | p, |
long | fd, | ||
const uint8_t * | data, | ||
uint16_t | len | ||
) |
Definition at line 104 of file udp.c.
References udp_periph::tx_buf, udp_periph::tx_insert_idx, and UDP_TX_BUFFER_SIZE.
Referenced by udp_periph_init().
void WEAK udp_put_byte | ( | struct udp_periph * | p, |
long | fd, | ||
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 94 of file udp.c.
References udp_periph::tx_buf, udp_periph::tx_insert_idx, and UDP_TX_BUFFER_SIZE.
Referenced by udp_periph_init().