summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2012-11-02 21:47:14 +0100
committerSteve Markgraf <steve@steve-m.de>2012-11-02 21:47:14 +0100
commitb85ffcfea5d268f34b2de4f2119b30be8c699269 (patch)
tree45420a98c95e0eb5c127a010f36cfb9dcdca301d /include
parentaad68f3a21f8507d5ad7b01dc9e980d2f0d7e327 (diff)
add library support for EEPROM access and tool for modification
rtl_eeprom can be used to modify the USB descriptor strings etc. Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'include')
-rw-r--r--include/rtl-sdr.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h
index 157d2a5..6dca0d0 100644
--- a/include/rtl-sdr.h
+++ b/include/rtl-sdr.h
@@ -99,6 +99,38 @@ RTLSDR_API int rtlsdr_get_xtal_freq(rtlsdr_dev_t *dev, uint32_t *rtl_freq,
RTLSDR_API int rtlsdr_get_usb_strings(rtlsdr_dev_t *dev, char *manufact,
char *product, char *serial);
+/*!
+ * Write the device EEPROM
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \param data buffer of data to be written
+ * \param offset address where the data should be written
+ * \param len length of the data
+ * \return 0 on success
+ * \return -1 if device handle is invalid
+ * \return -2 if EEPROM size is exceeded
+ * \return -3 if no EEPROM was found
+ */
+
+RTLSDR_API int rtlsdr_write_eeprom(rtlsdr_dev_t *dev, uint8_t *data,
+ uint8_t offset, uint16_t len);
+
+/*!
+ * Read the device EEPROM
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \param data buffer where the data should be written
+ * \param offset address where the data should be read from
+ * \param len length of the data
+ * \return 0 on success
+ * \return -1 if device handle is invalid
+ * \return -2 if EEPROM size is exceeded
+ * \return -3 if no EEPROM was found
+ */
+
+RTLSDR_API int rtlsdr_read_eeprom(rtlsdr_dev_t *dev, uint8_t *data,
+ uint8_t offset, uint16_t len);
+
RTLSDR_API int rtlsdr_set_center_freq(rtlsdr_dev_t *dev, uint32_t freq);
/*!