| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
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
14# include <uhd/usrp/dboard_eeprom.hpp>
15# include <string>
16
17 struct uhd_dboard_eeprom_t
18{
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
38 UHD_API uhd_error uhd_dboard_eeprom_make(uhd_dboard_eeprom_handle* h);
39
41
45 UHD_API uhd_error uhd_dboard_eeprom_free(uhd_dboard_eeprom_handle* h);
46
48 UHD_API uhd_error uhd_dboard_eeprom_get_id(
49 uhd_dboard_eeprom_handle h, char* id_out, size_t strbuffer_len);
50
52 UHD_API uhd_error uhd_dboard_eeprom_set_id(uhd_dboard_eeprom_handle h, const char* id);
53
55 UHD_API uhd_error uhd_dboard_eeprom_get_serial(
56 uhd_dboard_eeprom_handle h, char* serial_out, size_t strbuffer_len);
57
59 UHD_API uhd_error uhd_dboard_eeprom_set_serial(
60 uhd_dboard_eeprom_handle h, const char* serial);
61
67 UHD_API uhd_error uhd_dboard_eeprom_get_revision(
68 uhd_dboard_eeprom_handle h, int* revision_out);
69
71 UHD_API uhd_error uhd_dboard_eeprom_set_revision(
72 uhd_dboard_eeprom_handle h, int revision);
73
75 UHD_API uhd_error uhd_dboard_eeprom_last_error(
76 uhd_dboard_eeprom_handle h, char* error_out, size_t strbuffer_len);
77
78#ifdef __cplusplus
79}
80#endif
config.h
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_get_revision
UHD_API uhd_error uhd_dboard_eeprom_get_revision(uhd_dboard_eeprom_handle h, int *revision_out)
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.
uhd_dboard_eeprom_free
UHD_API uhd_error uhd_dboard_eeprom_free(uhd_dboard_eeprom_handle *h)
Safely destroy the given handle.
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_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_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:35
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.
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.
dboard_eeprom.hpp
error.h
uhd_error
uhd_error
UHD error codes.
Definition error.h:20