USRP Hardware Driver and USRP Manual  Version: 4.6.0.0-7-gece7c4811
UHD and USRP Manual
mboard_eeprom.h
Go to the documentation of this file.
1 //
2 // Copyright 2015 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #pragma once
9 
10 #include <uhd/config.h>
11 #include <uhd/error.h>
12 
13 #ifdef __cplusplus
15 # include <string>
16 
17 struct uhd_mboard_eeprom_t
18 {
19  uhd::usrp::mboard_eeprom_t mboard_eeprom_cpp;
20  std::string last_error;
21 };
22 
23 extern "C" {
24 #else
25 struct uhd_mboard_eeprom_t;
26 #endif
27 
29 
35 typedef struct uhd_mboard_eeprom_t* uhd_mboard_eeprom_handle;
36 
38 UHD_API uhd_error uhd_mboard_eeprom_make(uhd_mboard_eeprom_handle* h);
39 
41 
45 UHD_API uhd_error uhd_mboard_eeprom_free(uhd_mboard_eeprom_handle* h);
46 
49  uhd_mboard_eeprom_handle h, const char* key, char* value_out, size_t strbuffer_len);
50 
53  uhd_mboard_eeprom_handle h, const char* key, const char* value);
54 
57  uhd_mboard_eeprom_handle h, char* error_out, size_t strbuffer_len);
58 
59 #ifdef __cplusplus
60 }
61 #endif
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:35
uhd_error
UHD error codes.
Definition: error.h:20
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:87
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.
UHD_API uhd_error uhd_mboard_eeprom_make(uhd_mboard_eeprom_handle *h)
Create a handle for working with a USRP motherboard EEPROM.