diff options
author | eb | 2008-10-27 00:20:10 +0000 |
---|---|---|
committer | eb | 2008-10-27 00:20:10 +0000 |
commit | 13c1a42f1cbe20d3d0e1fc5370d402c020770821 (patch) | |
tree | 0506db81b7d3bdee9f334b20ba43aee5b28ea0c9 /usrp2/firmware/lib | |
parent | a538f5aa702bb3ee2a9e6bb9ac3ef1a2988ed36b (diff) | |
download | gnuradio-13c1a42f1cbe20d3d0e1fc5370d402c020770821.tar.gz gnuradio-13c1a42f1cbe20d3d0e1fc5370d402c020770821.tar.bz2 gnuradio-13c1a42f1cbe20d3d0e1fc5370d402c020770821.zip |
removed extra indentation. No change in functionality
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9861 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/firmware/lib')
-rw-r--r-- | usrp2/firmware/lib/dbsm.c | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/usrp2/firmware/lib/dbsm.c b/usrp2/firmware/lib/dbsm.c index 5e2042bed..b11d16824 100644 --- a/usrp2/firmware/lib/dbsm.c +++ b/usrp2/firmware/lib/dbsm.c @@ -177,50 +177,48 @@ dbsm_process_helper(dbsm_t *sm, int buf_this) { int buf_other = buf_this ^ 1; - if (1){ - bp_clear_buf(buf_this); - - if (buffer_state[buf_this] == BS_FILLING){ - buffer_state[buf_this] = BS_FULL; - // - // does s/w handle this packet? - // - if (sm->inspect(sm, buf_this)){ - // s/w handled the packet; refill the buffer - dbsm_receive_to_buf(sm, buf_this); - buffer_state[buf_this] = BS_FILLING; - } + bp_clear_buf(buf_this); - else { // s/w didn't handle this; pass it on + if (buffer_state[buf_this] == BS_FILLING){ + buffer_state[buf_this] = BS_FULL; + // + // does s/w handle this packet? + // + if (sm->inspect(sm, buf_this)){ + // s/w handled the packet; refill the buffer + dbsm_receive_to_buf(sm, buf_this); + buffer_state[buf_this] = BS_FILLING; + } - if(buffer_state[buf_other] == BS_EMPTY){ - dbsm_receive_to_buf(sm, buf_other); - buffer_state[buf_other] = BS_FILLING; - } - else - sm->rx_idle = true; + else { // s/w didn't handle this; pass it on - if (sm->tx_idle){ - sm->tx_idle = false; - dbsm_send_from_buf(sm, buf_this); - buffer_state[buf_this] = BS_EMPTYING; - } - } - } - else { // buffer was emptying - buffer_state[buf_this] = BS_EMPTY; - if (sm->rx_idle){ - sm->rx_idle = false; - dbsm_receive_to_buf(sm, buf_this); - buffer_state[buf_this] = BS_FILLING; - } - if (buffer_state[buf_other] == BS_FULL){ - dbsm_send_from_buf(sm, buf_other); - buffer_state[buf_other] = BS_EMPTYING; + if(buffer_state[buf_other] == BS_EMPTY){ + dbsm_receive_to_buf(sm, buf_other); + buffer_state[buf_other] = BS_FILLING; } else - sm->tx_idle = true; + sm->rx_idle = true; + + if (sm->tx_idle){ + sm->tx_idle = false; + dbsm_send_from_buf(sm, buf_this); + buffer_state[buf_this] = BS_EMPTYING; + } + } + } + else { // buffer was emptying + buffer_state[buf_this] = BS_EMPTY; + if (sm->rx_idle){ + sm->rx_idle = false; + dbsm_receive_to_buf(sm, buf_this); + buffer_state[buf_this] = BS_FILLING; + } + if (buffer_state[buf_other] == BS_FULL){ + dbsm_send_from_buf(sm, buf_other); + buffer_state[buf_other] = BS_EMPTYING; } + else + sm->tx_idle = true; } } |