mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
first working(?) version
This commit is contained in:
1 parent
7eb3676aaf
commit
f7b8aed2f7
5 files changed
+12
-16
No files matched your search
+3
-11
@@ -1,17 +1,9 @@
|
||||
|
||||
#include "stdint.h"
|
||||
#include "uip/uip.h"
|
||||
#include "udp_apps.h"
|
||||
|
||||
static uint8_t callbacknr;
|
||||
|
||||
void udp_callbacks(void)
|
||||
{
|
||||
// Calling more than one callback from the same UIP_UDP_APPCALL does not work; we use a simple dispatcher
|
||||
if (callbacknr == 0) {
|
||||
dhcp_callback();
|
||||
callbacknr = 1;
|
||||
} else {
|
||||
syslog_callback();
|
||||
callbacknr = 0;
|
||||
}
|
||||
dhcp_callback(uip_udp_conn->lport); // let the application decide if this is for it or not
|
||||
syslog_callback(uip_udp_conn->lport); // let the application decide if this is for it or not
|
||||
}
|
||||
Reference in new issue
Block a user