aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-11 12:19:22 -0800
committerJosh Blum <josh@joshknows.com>2011-01-11 12:19:22 -0800
commit599771914d0848875a0056cd60850eec39b06654 (patch)
tree66ddf3ee03ca33a19be565bb6fb5d1b22b52fc3c
parent09e06246984546ad29c159a64f8c0419b81f8013 (diff)
downloaduhd-599771914d0848875a0056cd60850eec39b06654.tar.gz
uhd-599771914d0848875a0056cd60850eec39b06654.tar.bz2
uhd-599771914d0848875a0056cd60850eec39b06654.zip
usrp2: restart read before mode switch, added comments
use cmake compiler force macro (to simplify things), added copyright updates dates to some files
-rw-r--r--firmware/zpu/CMakeLists.txt7
-rw-r--r--firmware/zpu/apps/txrx_uhd.c2
-rw-r--r--firmware/zpu/lib/pkt_ctrl.c16
-rw-r--r--firmware/zpu/lib/pkt_ctrl.h6
-rw-r--r--firmware/zpu/usrp2/CMakeLists.txt2
-rw-r--r--firmware/zpu/usrp2p/CMakeLists.txt2
-rw-r--r--firmware/zpu/usrp2p/bootloader/CMakeLists.txt2
-rw-r--r--host/lib/convert/convert_with_neon.cpp1
8 files changed, 17 insertions, 21 deletions
diff --git a/firmware/zpu/CMakeLists.txt b/firmware/zpu/CMakeLists.txt
index 2df0a6140..d7cedbfb9 100644
--- a/firmware/zpu/CMakeLists.txt
+++ b/firmware/zpu/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010 Ettus Research LLC
+# Copyright 2010-2011 Ettus Research LLC
#
# 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
@@ -19,10 +19,9 @@
# setup project and compiler
########################################################################
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-SET(CMAKE_C_COMPILER zpu-elf-gcc)
#force the compiler because the check wont use the special flag below
-SET(CMAKE_C_COMPILER_WORKS TRUE)
-SET(CMAKE_C_COMPILER_FORCED TRUE)
+INCLUDE(CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER(zpu-elf-gcc GNU)
PROJECT(USRP_NXXX_FW C)
########################################################################
diff --git a/firmware/zpu/apps/txrx_uhd.c b/firmware/zpu/apps/txrx_uhd.c
index ab960dac8..61a2c1f76 100644
--- a/firmware/zpu/apps/txrx_uhd.c
+++ b/firmware/zpu/apps/txrx_uhd.c
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2011 Ettus Research LLC
//
/*
* Copyright 2007,2008 Free Software Foundation, Inc.
diff --git a/firmware/zpu/lib/pkt_ctrl.c b/firmware/zpu/lib/pkt_ctrl.c
index 341ad44e1..2bbe2f843 100644
--- a/firmware/zpu/lib/pkt_ctrl.c
+++ b/firmware/zpu/lib/pkt_ctrl.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2010 Ettus Research LLC
+ * Copyright 2010-2011 Ettus Research LLC
*
* 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
@@ -18,7 +18,6 @@
#include "pkt_ctrl.h"
#include "memory_map.h"
#include <nonstdio.h>
-#include <mdelay.h>
//status signals from WB into PR
#define CPU_STAT_RD_DONE (1 << 0)
@@ -46,13 +45,12 @@ void pkt_ctrl_program_inspector(
}
void pkt_ctrl_set_routing_mode(pkt_ctrl_routing_mode_t mode){
- mdelay(100); //give a little delay to space out subsequent calls
- switch(mode){
- case PKT_CTRL_ROUTING_MODE_SLAVE: router_ctrl->mode_ctrl = 0; break;
- case PKT_CTRL_ROUTING_MODE_MASTER: router_ctrl->mode_ctrl = 1; break;
- }
- router_ctrl->iface_ctrl = CPU_CTRL_WR_CLEAR; //reset the write state machine
- pkt_ctrl_release_incoming_buffer(); //reset the read state machine, and read
+ //About to change the mode; ensure that we are accepting packets.
+ //The plumbing will not switch if it cannot pass an end of packet.
+ pkt_ctrl_release_incoming_buffer();
+
+ //Change the mode; this switches the valves and crossbars.
+ router_ctrl->mode_ctrl = mode;
}
static inline void cpu_stat_wait_for(int bm){
diff --git a/firmware/zpu/lib/pkt_ctrl.h b/firmware/zpu/lib/pkt_ctrl.h
index 410ffdaa4..15e4b0c4d 100644
--- a/firmware/zpu/lib/pkt_ctrl.h
+++ b/firmware/zpu/lib/pkt_ctrl.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2010 Ettus Research LLC
+ * Copyright 2010-2011 Ettus Research LLC
*
* 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
@@ -24,8 +24,8 @@
#include <lwip/ip_addr.h>
typedef enum {
- PKT_CTRL_ROUTING_MODE_SLAVE,
- PKT_CTRL_ROUTING_MODE_MASTER,
+ PKT_CTRL_ROUTING_MODE_SLAVE = 0,
+ PKT_CTRL_ROUTING_MODE_MASTER = 1
} pkt_ctrl_routing_mode_t;
//! Program the decision values into the packet inspector
diff --git a/firmware/zpu/usrp2/CMakeLists.txt b/firmware/zpu/usrp2/CMakeLists.txt
index d126c921c..e54499084 100644
--- a/firmware/zpu/usrp2/CMakeLists.txt
+++ b/firmware/zpu/usrp2/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010 Ettus Research LLC
+# Copyright 2010-2011 Ettus Research LLC
#
# 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
diff --git a/firmware/zpu/usrp2p/CMakeLists.txt b/firmware/zpu/usrp2p/CMakeLists.txt
index 93ccf82c3..c7ab9abdb 100644
--- a/firmware/zpu/usrp2p/CMakeLists.txt
+++ b/firmware/zpu/usrp2p/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010 Ettus Research LLC
+# Copyright 2010-2011 Ettus Research LLC
#
# 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
diff --git a/firmware/zpu/usrp2p/bootloader/CMakeLists.txt b/firmware/zpu/usrp2p/bootloader/CMakeLists.txt
index 155915011..2c7efb43a 100644
--- a/firmware/zpu/usrp2p/bootloader/CMakeLists.txt
+++ b/firmware/zpu/usrp2p/bootloader/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010 Ettus Research LLC
+# Copyright 2010-2011 Ettus Research LLC
#
# 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
diff --git a/host/lib/convert/convert_with_neon.cpp b/host/lib/convert/convert_with_neon.cpp
index f379f4d29..3d677db5b 100644
--- a/host/lib/convert/convert_with_neon.cpp
+++ b/host/lib/convert/convert_with_neon.cpp
@@ -16,7 +16,6 @@
//
#include "convert_common.hpp"
-#include <uhd/utils/byteswap.hpp>
#include <arm_neon.h>
using namespace uhd::convert;