aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/n230/n230_impl.cpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2016-01-05 17:08:06 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-01-05 17:35:15 -0800
commit81bbb57c06feaa05406ba86abc237a2e80841226 (patch)
tree11bb0cf199ca3a99a676d620e3ffc2b679e5a394 /host/lib/usrp/n230/n230_impl.cpp
parent863ca545d629e0e40a21e085572440e764de882d (diff)
downloaduhd-81bbb57c06feaa05406ba86abc237a2e80841226.tar.gz
uhd-81bbb57c06feaa05406ba86abc237a2e80841226.tar.bz2
uhd-81bbb57c06feaa05406ba86abc237a2e80841226.zip
n230: GPIO ATR cleanup and miniSAS GPIO support
- Replaced all gpio_200 cores with gpio_3000 - Added support for miniSAS GPIO through FP0 and FP1 banks
Diffstat (limited to 'host/lib/usrp/n230/n230_impl.cpp')
-rw-r--r--host/lib/usrp/n230/n230_impl.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index d05ab9ee9..873a9a89f 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -369,7 +369,33 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(rx_spec);
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(tx_spec);
+ //------------------------------------------------------------------
+ // MiniSAS GPIO
+ //------------------------------------------------------------------
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "DDR")
+ .set(0)
+ .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ _resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_DDR, _1));
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "DDR")
+ .set(0)
+ .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ _resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_DDR, _1));
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "OUT")
+ .set(0)
+ .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ _resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_OUT, _1));
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "OUT")
+ .set(0)
+ .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ _resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_OUT, _1));
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
+ .publish(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(0)));
+ _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "READBACK")
+ .publish(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(1)));
+
+ //------------------------------------------------------------------
// GPSDO sensors
+ //------------------------------------------------------------------
uhd::gps_ctrl::sptr gps_ctrl = _resource_mgr->get_gps_ctrl();
if (gps_ctrl and gps_ctrl->gps_detected())
{