From: eb Date: Fri, 23 Jan 2009 02:12:04 +0000 (+0000) Subject: revert extraction of buffer_state X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=63bda2352df94fd07843b38be17a6129acb5af54;p=debian%2Fgnuradio revert extraction of buffer_state git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10294 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/usrp2/firmware/lib/Makefile.am b/usrp2/firmware/lib/Makefile.am index 027b6ac9..4c263308 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 25c5a3fd..845046d6 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 +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 cea5022f..00000000 --- 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 . - */ - -#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 f855dc4a..00000000 --- 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 . - */ - -#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 cfe91153..8f774d91 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 +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) {