USRP Hardware Driver and USRP Manual  Version: 004.000.000.HEAD-0-g8773fb2c
UHD and USRP Manual
gpio_defs.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2011,2014,2015 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_LIBUHD_USRP_GPIO_DEFS_HPP
19 #define INCLUDED_LIBUHD_USRP_GPIO_DEFS_HPP
20 
21 #include <uhd/config.hpp>
22 #include <boost/assign.hpp>
23 #include <boost/utility.hpp>
24 #include <map>
25 
26 namespace uhd { namespace usrp { namespace gpio_atr {
27 
29  ATR_REG_IDLE = int('i'),
30  ATR_REG_TX_ONLY = int('t'),
31  ATR_REG_RX_ONLY = int('r'),
33 };
34 
36  MODE_ATR = 0, //Output driven by the auto-transmit-receive engine
37  MODE_GPIO = 1 //Output value is static
38 };
39 
40 enum gpio_ddr_t {
41  DDR_INPUT = 0,
43 };
44 
53 };
54 
55 typedef std::map<gpio_attr_t, std::string> gpio_attr_map_t;
56 
57 static const gpio_attr_map_t gpio_attr_map =
58  boost::assign::map_list_of
59  (GPIO_CTRL, "CTRL")
60  (GPIO_DDR, "DDR")
61  (GPIO_OUT, "OUT")
62  (GPIO_ATR_0X, "ATR_0X")
63  (GPIO_ATR_RX, "ATR_RX")
64  (GPIO_ATR_TX, "ATR_TX")
65  (GPIO_ATR_XX, "ATR_XX")
66 ;
67 
68 }}} //namespaces
69 
70 #endif /* INCLUDED_LIBUHD_USRP_GPIO_DEFS_HPP */
Definition: gpio_defs.hpp:52
gpio_ddr_t
Definition: gpio_defs.hpp:40
Definition: gpio_defs.hpp:50
Definition: gpio_defs.hpp:29
Definition: gpio_defs.hpp:51
Definition: gpio_defs.hpp:47
Definition: gpio_defs.hpp:36
Definition: gpio_defs.hpp:32
Definition: gpio_defs.hpp:31
Definition: gpio_defs.hpp:46
std::map< gpio_attr_t, std::string > gpio_attr_map_t
Definition: gpio_defs.hpp:55
Definition: build_info.hpp:25
Definition: gpio_defs.hpp:49
Definition: gpio_defs.hpp:41
gpio_atr_reg_t
Definition: gpio_defs.hpp:28
Definition: gpio_defs.hpp:48
Definition: gpio_defs.hpp:30
gpio_atr_mode_t
Definition: gpio_defs.hpp:35
Definition: gpio_defs.hpp:42
Definition: gpio_defs.hpp:37
gpio_attr_t
Definition: gpio_defs.hpp:45