commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7365 - usrp2/trunk/firmware/lib


From: eb
Subject: [Commit-gnuradio] r7365 - usrp2/trunk/firmware/lib
Date: Sat, 5 Jan 2008 20:09:29 -0700 (MST)

Author: eb
Date: 2008-01-05 20:09:29 -0700 (Sat, 05 Jan 2008)
New Revision: 7365

Modified:
   usrp2/trunk/firmware/lib/buffer_pool.c
   usrp2/trunk/firmware/lib/buffer_pool.h
Log:
Running out of code space.  Don't inline buffer_pool ops

Modified: usrp2/trunk/firmware/lib/buffer_pool.c
===================================================================
--- usrp2/trunk/firmware/lib/buffer_pool.c      2008-01-06 01:09:51 UTC (rev 
7364)
+++ usrp2/trunk/firmware/lib/buffer_pool.c      2008-01-06 03:09:29 UTC (rev 
7365)
@@ -31,3 +31,42 @@
   for (i = 0; i < NBUFFERS; i++)
     bp_clear_buf(i);
 }
+
+#ifndef INLINE_BUFFER_POOL
+
+void
+bp_clear_buf(int bufnum)
+{
+  buffer_pool_ctrl->ctrl = BPC_BUFFER(bufnum) | BPC_PORT_NIL | BPC_CLR;
+}
+
+void
+bp_disable_port(int portnum) 
+{
+  // disable buffer connections to this port
+  buffer_pool_ctrl->ctrl = BPC_BUFFER_NIL | BPC_PORT(portnum);
+}
+
+void
+bp_receive_to_buf(int bufnum, int port, int step, int fl, int ll)
+{
+  buffer_pool_ctrl->ctrl = (BPC_READ
+                           | BPC_BUFFER(bufnum)
+                           | BPC_PORT(port)
+                           | BPC_STEP(step)
+                           | BPC_FIRST_LINE(fl)
+                           | BPC_LAST_LINE(ll));
+}
+
+void
+bp_send_from_buf(int bufnum, int port, int step, int fl, int ll)
+{
+  buffer_pool_ctrl->ctrl = (BPC_WRITE
+                           | BPC_BUFFER(bufnum)
+                           | BPC_PORT(port)
+                           | BPC_STEP(step)
+                           | BPC_FIRST_LINE(fl)
+                           | BPC_LAST_LINE(ll));
+}
+
+#endif

Modified: usrp2/trunk/firmware/lib/buffer_pool.h
===================================================================
--- usrp2/trunk/firmware/lib/buffer_pool.h      2008-01-06 01:09:51 UTC (rev 
7364)
+++ usrp2/trunk/firmware/lib/buffer_pool.h      2008-01-06 03:09:29 UTC (rev 
7365)
@@ -22,8 +22,21 @@
 
 // Buffer Pool Management
 
+
+// define to have common buffer operations inlined
+//#define INLINE_BUFFER_POOL 1
+
 void bp_init(void);
 
+#ifndef INLINE_BUFFER_POOL
+
+void bp_clear_buf(int bufnum);
+void bp_disable_port(int portnum);
+void bp_receive_to_buf(int bufnum, int port, int step, int fl, int ll);
+void bp_send_from_buf(int bufnum, int port, int step, int fl, int ll);
+
+#else
+
 static inline void
 bp_clear_buf(int bufnum)
 {
@@ -58,5 +71,5 @@
                            | BPC_FIRST_LINE(fl)
                            | BPC_LAST_LINE(ll));
 }
-
 #endif
+#endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]