63 p->rx_extract_idx = 0;
65 p->device.periph = (
void *)
p;
86 return available >= len ? available : 0;
100 p->tx_buf[
p->tx_insert_idx] = data;
110 memcpy(&(
p->tx_buf[
p->tx_insert_idx]), data, len);
111 p->tx_insert_idx += len;
void udp_arch_periph_init(struct udp_periph *p, char *host, int port_out, int port_in, bool broadcast)
Initialize the UDP peripheral.
uint8_t udp_getch(struct udp_periph *p)
Get the last character from the receive buffer.
int udp_char_available(struct udp_periph *p)
Get number of bytes available in receive buffer.
void udp_send_message(struct udp_periph *p, long fd)
Send a message.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
void udp_periph_init(struct udp_periph *p, char *host, int port_out, int port_in, bool broadcast)
Initialize the UDP peripheral.
void WEAK udp_put_buffer(struct udp_periph *p, long fd, const uint8_t *data, uint16_t len)
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.
void WEAK udp_put_byte(struct udp_periph *p, long fd, uint8_t data)
Add one data byte to the tx buffer.
#define UDP_TX_BUFFER_SIZE
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.