Revision 4357f5d3 host/lib/usrp/usrp_e100/usrp_e100_iface.cpp
| b/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp | ||
|---|---|---|
| 37 | 37 |
public: |
| 38 | 38 |
i2c_dev_iface(const std::string &node){
|
| 39 | 39 |
if ((_node_fd = ::open(node.c_str(), O_RDWR)) < 0){
|
| 40 |
throw std::runtime_error("Failed to open " + node);
|
|
| 40 |
throw uhd::io_error("Failed to open " + node);
|
|
| 41 | 41 |
} |
| 42 | 42 |
} |
| 43 | 43 |
|
| ... | ... | |
| 106 | 106 |
{
|
| 107 | 107 |
//open the device node and check file descriptor |
| 108 | 108 |
if ((_node_fd = ::open(node.c_str(), O_RDWR)) < 0){
|
| 109 |
throw std::runtime_error("Failed to open " + node);
|
|
| 109 |
throw uhd::io_error("Failed to open " + node);
|
|
| 110 | 110 |
} |
| 111 | 111 |
|
| 112 | 112 |
//very first thing, reset all the wishbone, always do first! |
| ... | ... | |
| 127 | 127 |
boost::mutex::scoped_lock lock(_ctrl_mutex); |
| 128 | 128 |
|
| 129 | 129 |
if (::ioctl(_node_fd, request, mem) < 0){
|
| 130 |
throw std::runtime_error(str(
|
|
| 130 |
throw uhd::os_error(str(
|
|
| 131 | 131 |
boost::format("ioctl failed with request %d") % request
|
| 132 | 132 |
)); |
| 133 | 133 |
} |
Also available in: Unified diff