USRP Hardware Driver and USRP Manual  Version: 3.13.0.HEAD-0-gf114cfa0
UHD and USRP Manual
dboard_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 #ifndef INCLUDED_UHD_USRP_DBOARD_EEPROM_H
9 #define INCLUDED_UHD_USRP_DBOARD_EEPROM_H
10 
11 #include <uhd/config.h>
12 #include <uhd/error.h>
13 
14 #ifdef __cplusplus
16 #include <string>
17 
18 struct uhd_dboard_eeprom_t {
19  uhd::usrp::dboard_eeprom_t dboard_eeprom_cpp;
20  std::string last_error;
21 };
22 
23 extern "C" {
24 #else
25 struct uhd_dboard_eeprom_t;
26 #endif
27 
29 
35 typedef struct uhd_dboard_eeprom_t* uhd_dboard_eeprom_handle;
36 
39  uhd_dboard_eeprom_handle* h
40 );
41 
43 
48  uhd_dboard_eeprom_handle* h
49 );
50 
53  uhd_dboard_eeprom_handle h,
54  char* id_out,
55  size_t strbuffer_len
56 );
57 
60  uhd_dboard_eeprom_handle h,
61  const char* id
62 );
63 
66  uhd_dboard_eeprom_handle h,
67  char* serial_out,
68  size_t strbuffer_len
69 );
70 
73  uhd_dboard_eeprom_handle h,
74  const char* serial
75 );
76 
83  uhd_dboard_eeprom_handle h,
84  int* revision_out
85 );
86 
89  uhd_dboard_eeprom_handle h,
90  int revision
91 );
92 
95  uhd_dboard_eeprom_handle h,
96  char* error_out,
97  size_t strbuffer_len
98 );
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
104 #endif /* INCLUDED_UHD_USRP_DBOARD_EEPROM_H */
UHD_API uhd_error uhd_dboard_eeprom_free(uhd_dboard_eeprom_handle *h)
Safely destroy the given handle.
UHD_API uhd_error uhd_dboard_eeprom_get_serial(uhd_dboard_eeprom_handle h, char *serial_out, size_t strbuffer_len)
Get the daughterboard&#39;s serial.
UHD_API uhd_error uhd_dboard_eeprom_set_revision(uhd_dboard_eeprom_handle h, int revision)
Set the daughterboard&#39;s revision.
uhd_error
UHD error codes.
Definition: error.h:21
UHD_API uhd_error uhd_dboard_eeprom_get_id(uhd_dboard_eeprom_handle h, char *id_out, size_t strbuffer_len)
Get the ID associated with the given daughterboard as a string hex representation.
struct uhd_dboard_eeprom_t * uhd_dboard_eeprom_handle
A C-level interface for interacting with a daughterboard EEPROM.
Definition: dboard_eeprom.h:35
Definition: dboard_eeprom.hpp:18
UHD_API uhd_error uhd_dboard_eeprom_get_revision(uhd_dboard_eeprom_handle h, int *revision_out)
UHD_API uhd_error uhd_dboard_eeprom_set_serial(uhd_dboard_eeprom_handle h, const char *serial)
Set the daughterboard&#39;s serial.
UHD_API uhd_error uhd_dboard_eeprom_make(uhd_dboard_eeprom_handle *h)
Create handle for a USRP daughterboard EEPROM.
#define UHD_API
Definition: config.h:63
UHD_API uhd_error uhd_dboard_eeprom_set_id(uhd_dboard_eeprom_handle h, const char *id)
Set the daughterboard ID using a string hex representation.
UHD_API uhd_error uhd_dboard_eeprom_last_error(uhd_dboard_eeprom_handle h, char *error_out, size_t strbuffer_len)
Get the last error reported by the handle.