Loading...
Searching...
No Matches
dboard_eeprom.h
Go to the documentation of this file.
//
// Copyright 2015 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.h>
#include <uhd/error.h>
#ifdef __cplusplus
# include <uhd/usrp/dboard_eeprom.hpp>
# include <string>
struct uhd_dboard_eeprom_t
{
uhd::usrp::dboard_eeprom_t dboard_eeprom_cpp;
std::string last_error;
};
extern "C" {
#else
struct uhd_dboard_eeprom_t;
#endif
typedef struct uhd_dboard_eeprom_t* uhd_dboard_eeprom_handle;
UHD_API uhd_error uhd_dboard_eeprom_make(uhd_dboard_eeprom_handle* h);
UHD_API uhd_error uhd_dboard_eeprom_free(uhd_dboard_eeprom_handle* h);
UHD_API uhd_error uhd_dboard_eeprom_get_id(
uhd_dboard_eeprom_handle h, char* id_out, size_t strbuffer_len);
UHD_API uhd_error uhd_dboard_eeprom_set_id(uhd_dboard_eeprom_handle h, const char* id);
UHD_API uhd_error uhd_dboard_eeprom_get_serial(
uhd_dboard_eeprom_handle h, char* serial_out, size_t strbuffer_len);
UHD_API uhd_error uhd_dboard_eeprom_set_serial(
uhd_dboard_eeprom_handle h, const char* serial);
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_revision(
uhd_dboard_eeprom_handle h, int revision);
UHD_API uhd_error uhd_dboard_eeprom_last_error(
uhd_dboard_eeprom_handle h, char* error_out, size_t strbuffer_len);
#ifdef __cplusplus
}
#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