From 6b7c53985c09a8d74e9bfd9c6b37948d458b2c44 Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Mon, 22 Feb 2010 18:47:05 -0800
Subject: Work on the io interface for a device (and some implementation work
 in usrp2). Modified the udp transport to reflect some of these changes. Got
 the fw compiling again, and it will not set data to true for small payloads
 (configuration ones).

---
 firmware/microblaze/apps/Makefile.am | 2 +-
 firmware/microblaze/apps/txrx.c      | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

(limited to 'firmware/microblaze/apps')

diff --git a/firmware/microblaze/apps/Makefile.am b/firmware/microblaze/apps/Makefile.am
index 6d993ef8c..ff426cf8c 100644
--- a/firmware/microblaze/apps/Makefile.am
+++ b/firmware/microblaze/apps/Makefile.am
@@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common
 
 LDADD = $(top_srcdir)/lib/libu2fw.a
 
-AM_CFLAGS += -I$(top_srcdir)/../../host/lib/usrp/mboard
+AM_CFLAGS += -I$(top_srcdir)/../../host/lib/usrp
 
 noinst_PROGRAMS = txrx.elf
 
diff --git a/firmware/microblaze/apps/txrx.c b/firmware/microblaze/apps/txrx.c
index 77c8e498c..16aa8eab2 100644
--- a/firmware/microblaze/apps/txrx.c
+++ b/firmware/microblaze/apps/txrx.c
@@ -159,7 +159,10 @@ void handle_udp_data_packet(
     unsigned char *payload, int payload_len
 ){
     //TODO store the reply port
-    _is_data = true;
+
+    //forward this data to the dsp when the payload is sufficient
+    //the small payload is used to give the device the udp source port
+    _is_data = payload_len > sizeof(uint32_t);
 }
 
 #define OTW_GPIO_BANK_TO_NUM(bank) \
-- 
cgit v1.2.3