USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
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 #pragma once
9 
10 #include <uhd/config.h>
11 #include <uhd/error.h>
12 
13 #ifdef __cplusplus
15 #include <string>
16 
17 struct uhd_dboard_eeprom_t {
18  uhd::usrp::dboard_eeprom_t dboard_eeprom_cpp;
19  std::string last_error;
20 };
21 
22 extern "C" {
23 #else
24 struct uhd_dboard_eeprom_t;
25 #endif
26 
28 
34 typedef struct uhd_dboard_eeprom_t* uhd_dboard_eeprom_handle;
35 
39 );
40 
42 
48 );
49 
53  char* id_out,
54  size_t strbuffer_len
55 );
56 
60  const char* id
61 );
62 
66  char* serial_out,
67  size_t strbuffer_len
68 );
69 
73  const char* serial
74 );
75 
83  int* revision_out
84 );
85 
89  int revision
90 );
91 
95  char* error_out,
96  size_t strbuffer_len
97 );
98 
99 #ifdef __cplusplus
100 }
101 #endif
uhd_dboard_eeprom_set_revision
UHD_API uhd_error uhd_dboard_eeprom_set_revision(uhd_dboard_eeprom_handle h, int revision)
Set the daughterboard's revision.
uhd_dboard_eeprom_make
UHD_API uhd_error uhd_dboard_eeprom_make(uhd_dboard_eeprom_handle *h)
Create handle for a USRP daughterboard EEPROM.
uhd_dboard_eeprom_get_revision
UHD_API uhd_error uhd_dboard_eeprom_get_revision(uhd_dboard_eeprom_handle h, int *revision_out)
uhd::usrp::dboard_eeprom_t
Definition: dboard_eeprom.hpp:17
uhd_dboard_eeprom_get_id
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.
uhd_error
uhd_error
UHD error codes.
Definition: error.h:20
uhd_dboard_eeprom_set_serial
UHD_API uhd_error uhd_dboard_eeprom_set_serial(uhd_dboard_eeprom_handle h, const char *serial)
Set the daughterboard's serial.
UHD_API
#define UHD_API
Definition: config.h:87
uhd_dboard_eeprom_set_id
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_dboard_eeprom_last_error
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.
error.h
uhd_dboard_eeprom_free
UHD_API uhd_error uhd_dboard_eeprom_free(uhd_dboard_eeprom_handle *h)
Safely destroy the given handle.
dboard_eeprom.hpp
config.h
uhd_dboard_eeprom_handle
struct uhd_dboard_eeprom_t * uhd_dboard_eeprom_handle
A C-level interface for interacting with a daughterboard EEPROM.
Definition: dboard_eeprom.h:34
uhd_dboard_eeprom_get_serial
UHD_API uhd_error uhd_dboard_eeprom_get_serial(uhd_dboard_eeprom_handle h, char *serial_out, size_t strbuffer_len)
Get the daughterboard's serial.