USRP Hardware Driver and USRP Manual  Version: 003.009.003-0-gf0720677
UHD and USRP Manual
mboard_eeprom.h
Go to the documentation of this file.
1 //
2 // Copyright 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_UHD_USRP_MBOARD_EEPROM_H
19 #define INCLUDED_UHD_USRP_MBOARD_EEPROM_H
20 
21 #include <uhd/config.h>
22 #include <uhd/error.h>
23 
24 #ifdef __cplusplus
26 #include <string>
27 
28 struct uhd_mboard_eeprom_t {
29  uhd::usrp::mboard_eeprom_t mboard_eeprom_cpp;
30  std::string last_error;
31 };
32 
33 extern "C" {
34 #else
35 struct uhd_mboard_eeprom_t;
36 #endif
37 
39 
45 typedef struct uhd_mboard_eeprom_t* uhd_mboard_eeprom_handle;
46 
49  uhd_mboard_eeprom_handle* h
50 );
51 
53 
58  uhd_mboard_eeprom_handle* h
59 );
60 
63  uhd_mboard_eeprom_handle h,
64  const char* key,
65  char* value_out,
66  size_t strbuffer_len
67 );
68 
71  uhd_mboard_eeprom_handle h,
72  const char* key,
73  const char* value
74 );
75 
78  uhd_mboard_eeprom_handle h,
79  char* error_out,
80  size_t strbuffer_len
81 );
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif /* INCLUDED_UHD_USRP_MBOARD_EEPROM_H */
UHD_API uhd_error uhd_mboard_eeprom_set_value(uhd_mboard_eeprom_handle h, const char *key, const char *value)
Set the value for the given EEPROM key.
struct uhd_mboard_eeprom_t * uhd_mboard_eeprom_handle
A C-level interface for interacting with a USRP motherboard&#39;s EEPROM.
Definition: mboard_eeprom.h:45
uhd_error
UHD error codes.
Definition: error.h:31
UHD_API uhd_error uhd_mboard_eeprom_get_value(uhd_mboard_eeprom_handle h, const char *key, char *value_out, size_t strbuffer_len)
Get the value associated with the given EEPROM key.
#define UHD_API
Definition: config.h:66
UHD_API uhd_error uhd_mboard_eeprom_free(uhd_mboard_eeprom_handle *h)
Free a USRP motherboard EEPROM handle.
UHD_API uhd_error uhd_mboard_eeprom_last_error(uhd_mboard_eeprom_handle h, char *error_out, size_t strbuffer_len)
Get the last error recorded by the handle.
Definition: mboard_eeprom.hpp:35
UHD_API uhd_error uhd_mboard_eeprom_make(uhd_mboard_eeprom_handle *h)
Create a handle for working with a USRP motherboard EEPROM.