summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-25 18:55:09 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-25 18:55:09 -0700
commit0019bb05437702a6727d3632c6efc6a600bb4aa2 (patch)
tree0017d74d367d6785ab4df1521c619d0904f3f170
parentf60d5513fa80fc4d64f2781352baa6180f58fd51 (diff)
downloaduhd-0019bb05437702a6727d3632c6efc6a600bb4aa2.tar.gz
uhd-0019bb05437702a6727d3632c6efc6a600bb4aa2.tar.bz2
uhd-0019bb05437702a6727d3632c6efc6a600bb4aa2.zip
Change to get codec_impl to compile, dur.
Changed memory map to correspond to new tx_policy code.
-rw-r--r--firmware/microblaze/usrp2p/memory_map.h4
-rw-r--r--host/lib/usrp/usrp2/codec_impl.cpp22
2 files changed, 13 insertions, 13 deletions
diff --git a/firmware/microblaze/usrp2p/memory_map.h b/firmware/microblaze/usrp2p/memory_map.h
index addcf67d4..8d0d0c365 100644
--- a/firmware/microblaze/usrp2p/memory_map.h
+++ b/firmware/microblaze/usrp2p/memory_map.h
@@ -417,12 +417,12 @@ typedef struct {
// crazy order that matches the labels on the case
#define LED_A (1 << 2)
-#define LED_B (1 << 5)
+#define LED_B (1 << 0)
#define LED_E (1 << 3)
#define LED_D (1 << 1)
#define LED_C (1 << 4)
// LED_F // controlled by CPLD
-#define LED_RJ45 (1 << 0)
+#define LED_RJ45 (1 << 5)
#define output_regs ((output_regs_t *) MISC_OUTPUT_BASE)
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp
index f7f9ce2d5..db98e50ab 100644
--- a/host/lib/usrp/usrp2/codec_impl.cpp
+++ b/host/lib/usrp/usrp2/codec_impl.cpp
@@ -53,7 +53,8 @@ void usrp2_mboard_impl::codec_init(void){
/***********************************************************************
* RX Codec Properties
**********************************************************************/
-void usrp2_mboard_impl::rx_codec_get(const wax::obj &key, wax::obj &val){
+void usrp2_mboard_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
//handle the get request conditioned on the key
switch(key.as<codec_prop_t>()){
@@ -73,23 +74,21 @@ void usrp2_mboard_impl::rx_codec_get(const wax::obj &key, wax::obj &val){
case CODEC_PROP_GAIN_I:
case CODEC_PROP_GAIN_Q:
- assert_has(_codec_rx_gains.keys(), name, "codec rx gain name");
- val = _codec_rx_gains[name];
+ assert_has(_codec_rx_gains.keys(), key.name, "codec rx gain name");
+ val = _codec_rx_gains[key.name];
return;
case CODEC_PROP_GAIN_RANGE:
- assert_has(codec_rx_gain_ranges.keys(), name, "codec rx gain range name");
- val = codec_rx_gain_ranges[name];
- return;
+ assert_has(codec_rx_gain_ranges.keys(), key.name, "codec rx gain range name");
+ val = codec_rx_gain_ranges[key.name];
+ return;
default: UHD_THROW_PROP_GET_ERROR();
}
}
void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){
- wax::obj key; std::string name;
- boost::tie(key, name) = extract_named_prop(key_);
-
+ named_prop_t key = named_prop_t::extract(key_);
float gain;
switch(key.as<codec_prop_t>()) {
@@ -98,7 +97,7 @@ void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){
if(_iface->get_hw_rev() < USRP2P_FIRST_HW_REV) UHD_THROW_PROP_SET_ERROR();//this capability is only found in USRP2P
gain = val.as<float>();
- this->rx_codec_set_gain(gain, name);
+ this->rx_codec_set_gain(gain, key.name);
return;
default:
@@ -134,7 +133,8 @@ void usrp2_mboard_impl::rx_codec_set_gain(float gain, const std::string &name){
/***********************************************************************
* TX Codec Properties
**********************************************************************/
-void usrp2_mboard_impl::tx_codec_get(const wax::obj &key, wax::obj &val){
+void usrp2_mboard_impl::tx_codec_get(const wax::obj &key_, wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
//handle the get request conditioned on the key
switch(key.as<codec_prop_t>()){