28#if UIP_CONF_UDP > 0 || RF24ETHERNET_USE_UDP > 0
32 #define UIP_UDP_MAXDATALEN 1500
33 #define UIP_UDP_PHYH_LEN UIP_LLH_LEN + UIP_IPUDPH_LEN
34 #define UIP_UDP_MAXPACKETSIZE UIP_UDP_MAXDATALEN + UIP_UDP_PHYH_LEN
48 #elif RF24ETHERNET_USE_UDP
64 struct uip_udp_conn* _uip_udp_conn;
66 uip_udp_userdata_t appdata;
67 #elif RF24ETHERNET_USE_UDP
68 static struct udp_pcb* udpPcb;
70 static int8_t udpDataIn[MAX_PAYLOAD_SIZE - 14];
71 static int32_t dataInPos;
72 static int8_t udpDataOut[MAX_PAYLOAD_SIZE - 14];
73 static int32_t dataOutPos;
93 uint8_t
begin(uint16_t);
119 size_t write(uint8_t);
122 size_t write(
const uint8_t* buffer,
size_t size);
142 int read(
unsigned char* buffer,
size_t len);
148 int read(
char* buffer,
size_t len)
150 return read((
unsigned char*)buffer, len);
170 #ifndef RF24ETHERNET_USE_UDP
171 static void _send(uip_udp_userdata_t* data);
174 static void receiveUdp(
void* arg,
struct udp_pcb* pcb,
struct pbuf* p,
const ip_addr_t* addr,
u16_t port);
175 static void sendUdp(
void* arg);
static UDPState * udpState
int endPacket()
Finish off this packet and send it.
friend class RF24EthernetClass
size_t write(uint8_t)
Write a single byte into the packet.
void stop()
Finish with the UDP socket.
int read(char *buffer, size_t len)
int beginPacket(IPAddress ip, uint16_t port)
Sending UDP packets.
friend void uipudp_appcall(void)
uint8_t begin(uint16_t)
initialize, start listening on specified port.
volatile bool dataReceived
uint16_t u16_t
16 bit datatype