Revision 7c8fef85 host/lib/usrp/cores/gpio_core_200.cpp
| b/host/lib/usrp/cores/gpio_core_200.cpp | ||
|---|---|---|
| 63 | 63 |
wb_iface::sptr _iface; |
| 64 | 64 |
const size_t _base; |
| 65 | 65 |
const size_t _rb_addr; |
| 66 |
uhd::dict<size_t, boost::uint32_t> _update_cache; |
|
| 66 | 67 |
|
| 67 | 68 |
uhd::dict<unit_t, boost::uint16_t> _pin_ctrl, _gpio_out, _gpio_ddr; |
| 68 | 69 |
uhd::dict<unit_t, uhd::dict<atr_reg_t, boost::uint16_t> > _atr_regs; |
| ... | ... | |
| 90 | 91 |
const boost::uint32_t ctrl = |
| 91 | 92 |
(boost::uint32_t(_pin_ctrl[dboard_iface::UNIT_RX]) << unit2shit(dboard_iface::UNIT_RX)) | |
| 92 | 93 |
(boost::uint32_t(_pin_ctrl[dboard_iface::UNIT_TX]) << unit2shit(dboard_iface::UNIT_TX)); |
| 93 |
_iface->poke32(addr, (ctrl & atr_val) | ((~ctrl) & gpio_val)); |
|
| 94 |
const boost::uint32_t val = (ctrl & atr_val) | ((~ctrl) & gpio_val); |
|
| 95 |
if (not _update_cache.has_key(addr) or _update_cache[addr] != val) |
|
| 96 |
{
|
|
| 97 |
_iface->poke32(addr, val); |
|
| 98 |
} |
|
| 99 |
_update_cache[addr] = val; |
|
| 94 | 100 |
} |
| 95 | 101 |
|
| 96 | 102 |
}; |
Also available in: Unified diff