UHD  003.001.002
mboard_iface.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010-2011 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_UHD_USRP_MBOARD_IFACE_HPP
19 #define INCLUDED_UHD_USRP_MBOARD_IFACE_HPP
20 
21 #include <uhd/types/serial.hpp>
23 #include <boost/shared_ptr.hpp>
24 #include <boost/utility.hpp>
25 #include <boost/cstdint.hpp>
26 #include <utility>
27 #include <string>
28 
29 namespace uhd{ namespace usrp{
30 
36 class mboard_iface : public uhd::i2c_iface, public uhd::spi_iface {
37 public:
38  typedef boost::shared_ptr<mboard_iface> sptr;
44  virtual void poke32(boost::uint32_t addr, boost::uint32_t data) = 0;
45 
51  virtual boost::uint32_t peek32(boost::uint32_t addr) = 0;
52 
58  virtual void poke16(boost::uint32_t addr, boost::uint16_t data) = 0;
59 
65  virtual boost::uint16_t peek16(boost::uint32_t addr) = 0;
66 
72  virtual void write_uart(boost::uint8_t dev, const std::string &buf) = 0;
73 
79  virtual std::string read_uart(boost::uint8_t dev) = 0;
80 
81 };
82 
83 }}
84 
85 #endif //INCLUDED_UHD_USRP_DBOARD_IFACE_HPP
virtual void write_uart(boost::uint8_t dev, const std::string &buf)=0
Definition: serial.hpp:124
Definition: serial.hpp:44
virtual boost::uint32_t peek32(boost::uint32_t addr)=0
virtual void poke32(boost::uint32_t addr, boost::uint32_t data)=0
virtual void poke16(boost::uint32_t addr, boost::uint16_t data)=0
Definition: convert.hpp:28
virtual std::string read_uart(boost::uint8_t dev)=0
boost::shared_ptr< mboard_iface > sptr
Definition: mboard_iface.hpp:38
virtual boost::uint16_t peek16(boost::uint32_t addr)=0
Definition: mboard_iface.hpp:36