diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-18 16:39:45 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-18 16:39:45 -0700 |
commit | 16335c108272321408cae01f2d2bf234eb83fe32 (patch) | |
tree | 29755fbbf11d60380d81a77acc9a449f5b056ea9 /host/lib | |
parent | 1db016bc6503cdca76025f131773e550bd895d48 (diff) | |
download | uhd-16335c108272321408cae01f2d2bf234eb83fe32.tar.gz uhd-16335c108272321408cae01f2d2bf234eb83fe32.tar.bz2 uhd-16335c108272321408cae01f2d2bf234eb83fe32.zip |
uhd: added dboard manager call to register xcvr board, implemented in xcvr dboard code
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 24 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_wbx.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_xcvr2450.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/dboard_manager.cpp | 13 |
4 files changed, 24 insertions, 19 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 2585dfa8d..deb71546d 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -137,25 +137,21 @@ static dboard_base::sptr make_rfx_flex1200(dboard_base::ctor_args_t args){ return dboard_base::sptr(new rfx_xcvr(args, freq_range_t(1150e6, 1450e6), true, true)); } +static dboard_base::sptr make_rfx_flex2200(dboard_base::ctor_args_t args){ + return dboard_base::sptr(new rfx_xcvr(args, freq_range_t(2000e6, 2400e6), false, false)); +} + static dboard_base::sptr make_rfx_flex2400(dboard_base::ctor_args_t args){ return dboard_base::sptr(new rfx_xcvr(args, freq_range_t(2300e6, 2900e6), false, false)); } UHD_STATIC_BLOCK(reg_rfx_dboards){ - dboard_manager::register_dboard(0x0024, &make_rfx_flex400, "Flex 400 Rx MIMO B"); - dboard_manager::register_dboard(0x0028, &make_rfx_flex400, "Flex 400 Tx MIMO B"); - - dboard_manager::register_dboard(0x0025, &make_rfx_flex900, "Flex 900 Rx MIMO B"); - dboard_manager::register_dboard(0x0029, &make_rfx_flex900, "Flex 900 Tx MIMO B"); - - dboard_manager::register_dboard(0x0034, &make_rfx_flex1800, "Flex 1800 Rx MIMO B"); - dboard_manager::register_dboard(0x0035, &make_rfx_flex1800, "Flex 1800 Tx MIMO B"); - - dboard_manager::register_dboard(0x0026, &make_rfx_flex1200, "Flex 1200 Rx MIMO B"); - dboard_manager::register_dboard(0x002a, &make_rfx_flex1200, "Flex 1200 Tx MIMO B"); - - dboard_manager::register_dboard(0x0027, &make_rfx_flex2400, "Flex 2400 Rx MIMO B"); - dboard_manager::register_dboard(0x002b, &make_rfx_flex2400, "Flex 2400 Tx MIMO B"); + dboard_manager::register_dboard(0x0024, 0x0028, &make_rfx_flex400, "Flex 400 MIMO B"); + dboard_manager::register_dboard(0x0025, 0x0029, &make_rfx_flex900, "Flex 900 MIMO B"); + dboard_manager::register_dboard(0x0034, 0x0035, &make_rfx_flex1800, "Flex 1800 MIMO B"); + dboard_manager::register_dboard(0x0026, 0x002a, &make_rfx_flex1200, "Flex 1200 MIMO B"); + dboard_manager::register_dboard(0x002c, 0x002d, &make_rfx_flex2200, "Flex 2200 MIMO B"); + dboard_manager::register_dboard(0x0027, 0x002b, &make_rfx_flex2400, "Flex 2400 MIMO B"); } /*********************************************************************** diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp index 95dcb3802..6879dfb8a 100644 --- a/host/lib/usrp/dboard/db_wbx.cpp +++ b/host/lib/usrp/dboard/db_wbx.cpp @@ -154,8 +154,7 @@ static dboard_base::sptr make_wbx(dboard_base::ctor_args_t args){ } UHD_STATIC_BLOCK(reg_wbx_dboards){ - dboard_manager::register_dboard(0x0052, &make_wbx, "WBX RX"); - dboard_manager::register_dboard(0x0053, &make_wbx, "WBX TX"); + dboard_manager::register_dboard(0x0052, 0x0053, &make_wbx, "WBX"); } /*********************************************************************** diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 974a378bd..f5ff200ac 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -158,8 +158,7 @@ static dboard_base::sptr make_xcvr2450(dboard_base::ctor_args_t args){ UHD_STATIC_BLOCK(reg_xcvr2450_dboard){ //register the factory function for the rx and tx dbids - dboard_manager::register_dboard(0x0060, &make_xcvr2450, "XCVR2450 TX"); - dboard_manager::register_dboard(0x0061, &make_xcvr2450, "XCVR2450 RX"); + dboard_manager::register_dboard(0x0061, 0x0060, &make_xcvr2450, "XCVR2450"); } /*********************************************************************** diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index 35ddfc4ee..31af11ed0 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -43,7 +43,7 @@ typedef uhd::dict<dboard_id_t, args_t> id_to_args_map_t; UHD_SINGLETON_FCN(id_to_args_map_t, get_id_to_args_map) void dboard_manager::register_dboard( - dboard_id_t dboard_id, + const dboard_id_t &dboard_id, dboard_ctor_t dboard_ctor, const std::string &name, const prop_names_t &subdev_names @@ -57,6 +57,17 @@ void dboard_manager::register_dboard( get_id_to_args_map()[dboard_id] = args_t(dboard_ctor, name, subdev_names); } +void dboard_manager::register_dboard( + const dboard_id_t &rx_dboard_id, + const dboard_id_t &tx_dboard_id, + dboard_ctor_t dboard_ctor, + const std::string &name, + const prop_names_t &subdev_names +){ + register_dboard(rx_dboard_id, dboard_ctor, name, subdev_names); + register_dboard(tx_dboard_id, dboard_ctor, name, subdev_names); +} + std::string dboard_id_t::to_pp_string(void) const{ std::string name = "unknown"; if (get_id_to_args_map().has_key(*this)){ |