commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r6512 - gnuradio/branches/developers/matt/u2f/firmware


From: matt
Subject: [Commit-gnuradio] r6512 - gnuradio/branches/developers/matt/u2f/firmware
Date: Sun, 23 Sep 2007 18:57:10 -0600 (MDT)

Author: matt
Date: 2007-09-23 18:57:10 -0600 (Sun, 23 Sep 2007)
New Revision: 6512

Modified:
   gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.c
   gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.h
Log:
made functions inline


Modified: gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.c        
2007-09-24 00:55:15 UTC (rev 6511)
+++ gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.c        
2007-09-24 00:57:10 UTC (rev 6512)
@@ -1,27 +1,4 @@
-#include "buffer_pool.h"
 #include "memory_map.h"
+#include "buffer_pool.h"
+#include "sim_io.h" 
 
-void
-clear_buf(int bufnum) {
-  volatile int *addr = (int *)BUFFER_POOL_BASE;
-  *addr = (bufnum << 28) | (4<<25) | (1<<24);  // disable port connections to 
this buffer, clear state
-}
-
-void
-diable_port(int portnum) {
-  volatile int *addr = (int *)(BUFFER_POOL_BASE);
-  *addr = (8 << 28) | (portnum<<25); // disable buffer connections to this port
-}
-
-void
-receive_to_buf(int bufnum, int port, int step, int fl, int ll) {
-  volatile int *addr = (int *)(BUFFER_POOL_BASE);
-  *addr = (bufnum<<28) | (port << 25) | (1<<23) | (step<<18) | (ll<<9) | fl;
-}
-
-void
-send_from_buf(int bufnum, int port, int step, int fl, int ll) {
-  volatile int *addr = (int *)(BUFFER_POOL_BASE);
-  *addr = (bufnum<<28) | (port << 25) | (1<<22) | (step<<18) | (ll<<9) | fl;
-}
-

Modified: gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.h
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.h        
2007-09-24 00:55:15 UTC (rev 6511)
+++ gnuradio/branches/developers/matt/u2f/firmware/buffer_pool.h        
2007-09-24 00:57:10 UTC (rev 6512)
@@ -1,6 +1,32 @@
+#ifndef INCLUDED_BUFFER_POOL_H
+#define INCLUDED_BUFFER_POOL_H
 
+#include "memory_map.h"
+
 // Buffer Pool Management
-void clear_buf(int bufnum);
-void disable_port(int portnum);
-void receive_to_buf(int bufnum, int port, int step, int fl, int ll);
-void send_from_buf(int bufnum, int port, int step, int fl, int ll);
+
+static inline void
+clear_buf(int bufnum) {
+  volatile int *addr = (int *)BUFFER_POOL_BASE;
+  *addr = (bufnum << 28) | (4<<25) | (1<<24);  // disable port connections to 
this buffer, clear state
+}
+
+static inline void
+disable_port(int portnum) {
+  volatile int *addr = (int *)(BUFFER_POOL_BASE);
+  *addr = (8 << 28) | (portnum<<25); // disable buffer connections to this port
+}
+
+static inline void
+receive_to_buf(int bufnum, int port, int step, int fl, int ll) {
+  volatile int *addr = (int *)(BUFFER_POOL_BASE);
+  *addr = (bufnum<<28) | (port << 25) | (1<<23) | (step<<18) | (ll<<9) | fl;
+}
+
+static inline void
+send_from_buf(int bufnum, int port, int step, int fl, int ll) {
+  volatile int *addr = (int *)(BUFFER_POOL_BASE);
+  *addr = (bufnum<<28) | (port << 25) | (1<<22) | (step<<18) | (ll<<9) | fl;
+}
+
+#endif





reply via email to

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