summaryrefslogtreecommitdiff
path: root/usrp2
diff options
context:
space:
mode:
Diffstat (limited to 'usrp2')
-rw-r--r--usrp2/firmware/lib/Makefile.am2
-rw-r--r--usrp2/firmware/lib/bsm12.c10
-rw-r--r--usrp2/firmware/lib/buffer_state.c21
-rw-r--r--usrp2/firmware/lib/buffer_state.h33
-rw-r--r--usrp2/firmware/lib/dbsm.c10
5 files changed, 18 insertions, 58 deletions
diff --git a/usrp2/firmware/lib/Makefile.am b/usrp2/firmware/lib/Makefile.am
index 027b6ac9b..4c2633080 100644
--- a/usrp2/firmware/lib/Makefile.am
+++ b/usrp2/firmware/lib/Makefile.am
@@ -27,7 +27,6 @@ libu2fw_a_SOURCES = \
ad9777.c \
bsm12.c \
buffer_pool.c \
- buffer_state.c \
clocks.c \
db_basic.c \
db_init.c \
@@ -66,7 +65,6 @@ noinst_HEADERS = \
bool.h \
bsm12.h \
buffer_pool.h \
- buffer_state.h \
clocks.h \
db.h \
db_base.h \
diff --git a/usrp2/firmware/lib/bsm12.c b/usrp2/firmware/lib/bsm12.c
index 25c5a3fda..845046d65 100644
--- a/usrp2/firmware/lib/bsm12.c
+++ b/usrp2/firmware/lib/bsm12.c
@@ -25,9 +25,17 @@
#include "buffer_pool.h"
#include "bool.h"
#include "nonstdio.h"
-#include "buffer_state.h"
#include <stdlib.h>
+typedef enum {
+ BS_EMPTY,
+ BS_FILLING,
+ BS_FULL,
+ BS_EMPTYING,
+} buffer_state_t;
+
+static buffer_state_t buffer_state[NBUFFERS];
+static unsigned char buffer_dst[NBUFFERS]; // 0 or 1
static uint32_t last_send_ctrl[NBUFFERS];
void
diff --git a/usrp2/firmware/lib/buffer_state.c b/usrp2/firmware/lib/buffer_state.c
deleted file mode 100644
index cea5022f4..000000000
--- a/usrp2/firmware/lib/buffer_state.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "buffer_state.h"
-
-buffer_state_t buffer_state[NBUFFERS];
diff --git a/usrp2/firmware/lib/buffer_state.h b/usrp2/firmware/lib/buffer_state.h
deleted file mode 100644
index f855dc4ae..000000000
--- a/usrp2/firmware/lib/buffer_state.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INCLUDED_BUFFER_STATE_H
-#define INCLUDED_BUFFER_STATE_H
-
-#include "memory_map.h"
-
-typedef enum {
- BS_EMPTY,
- BS_FILLING,
- BS_FULL,
- BS_EMPTYING,
-} buffer_state_t;
-
-extern buffer_state_t buffer_state[NBUFFERS];
-
-#endif /* INCLUDED_BUFFER_STATE_H */
diff --git a/usrp2/firmware/lib/dbsm.c b/usrp2/firmware/lib/dbsm.c
index cfe911538..8f774d916 100644
--- a/usrp2/firmware/lib/dbsm.c
+++ b/usrp2/firmware/lib/dbsm.c
@@ -25,9 +25,17 @@
#include "buffer_pool.h"
#include "bool.h"
#include "nonstdio.h"
-#include "buffer_state.h"
#include <stdlib.h>
+typedef enum {
+ BS_EMPTY,
+ BS_FILLING,
+ BS_FULL,
+ BS_EMPTYING,
+} buffer_state_t;
+
+static buffer_state_t buffer_state[NBUFFERS];
+
bool
dbsm_nop_inspector(dbsm_t *sm, int buf_this)
{