gr-baz Package
|
#include <rtl2832.h>
Classes | |
struct | params |
Public Types | |
typedef struct RTL2832_NAMESPACE::demod::params | PARAMS |
typedef struct RTL2832_NAMESPACE::demod::params * | PPARAMS |
Public Member Functions | |
demod () | |
virtual | ~demod () |
int | initialise (PPARAMS params=NULL) |
const char * | name () const |
void | destroy () |
int | reset () |
int | set_sample_rate (uint32_t samp_rate, double *real_rate=NULL) |
int | set_if (double frequency) |
int | read_samples (unsigned char *buffer, uint32_t buffer_size, int *bytes_read, int timeout=-1) |
int | check_libusb_result (int res, bool zero_okay, const char *function_name=NULL, int line_number=-1, const char *line=NULL) |
void | log (const char *message,...) |
int | set_i2c_repeater (bool on=true, const char *function_name=NULL, int line_number=-1, const char *line=NULL) |
int | i2c_read (uint8_t i2c_addr, uint8_t *buffer, int len) |
int | i2c_write (uint8_t i2c_addr, uint8_t *buffer, int len) |
int | i2c_write_reg (uint8_t i2c_addr, uint8_t reg, uint8_t val) |
int | i2c_read_reg (uint8_t i2c_addr, uint8_t reg, uint8_t &data) |
int | set_gpio_output (uint8_t gpio) |
int | set_gpio_bit (uint8_t gpio, int val) |
tuner * | active_tuner () const |
double | sample_rate () const |
uint32_t | crystal_frequency () const |
range_t | sample_rate_range () const |
virtual int | set_i2c_repeater (bool on=true, const char *function_name=NULL, int line_number=-1, const char *line=NULL)=0 |
virtual int | i2c_read (uint8_t i2c_addr, uint8_t *buffer, int len)=0 |
virtual int | i2c_write (uint8_t i2c_addr, uint8_t *buffer, int len)=0 |
virtual int | i2c_write_reg (uint8_t i2c_addr, uint8_t reg, uint8_t val)=0 |
virtual int | i2c_read_reg (uint8_t i2c_addr, uint8_t reg, uint8_t &data)=0 |
virtual const char * | name () const =0 |
Protected Types | |
enum | usb_reg { USB_SYSCTL = 0x2000 , USB_CTRL = 0x2010 , USB_STAT = 0x2014 , USB_EPA_CFG = 0x2144 , USB_EPA_CTL = 0x2148 , USB_EPA_MAXPKT = 0x2158 , USB_EPA_MAXPKT_2 = 0x215a , USB_EPA_FIFO_CFG = 0x2160 } |
enum | sys_reg { DEMOD_CTL = 0x3000 , GPO = 0x3001 , GPI = 0x3002 , GPOE = 0x3003 , GPD = 0x3004 , SYSINTE = 0x3005 , SYSINTS = 0x3006 , GP_CFG0 = 0x3007 , GP_CFG1 = 0x3008 , SYSINTE_1 = 0x3009 , SYSINTS_1 = 0x300a , DEMOD_CTL_1 = 0x300b , IR_SUSPEND = 0x300c } |
enum | blocks { DEMODB = 0 , USBB = 1 , SYSB = 2 , TUNB = 3 , ROMB = 4 , IRB = 5 , IICB = 6 } |
Protected Member Functions | |
int | find_device () |
int | init_demod () |
int | demod_write_reg (uint8_t page, uint16_t addr, uint16_t val, uint8_t len) |
int | demod_read_reg (uint8_t page, uint8_t addr, uint8_t len, uint16_t ®) |
int | write_reg (uint8_t block, uint16_t addr, uint16_t val, uint8_t len) |
int | read_reg (uint8_t block, uint16_t addr, uint8_t len, uint16_t ®) |
int | write_array (uint8_t block, uint16_t addr, uint8_t *array, uint8_t len) |
int | read_array (uint8_t block, uint16_t addr, uint8_t *array, uint8_t len) |
Protected Attributes | |
struct libusb_device_handle * | m_devh |
PDEVICE_INFO | m_current_info |
tuner * | m_tuner |
tuner * | m_dummy_tuner |
bool | m_libusb_init_done |
PARAMS | m_params |
range_t | m_sample_rate_range |
double | m_sample_rate |
uint32_t | m_crystal_frequency |
bool | m_tuner_was_active |
typedef struct RTL2832_NAMESPACE::demod::params RTL2832_NAMESPACE::demod::PARAMS |
typedef struct RTL2832_NAMESPACE::demod::params * RTL2832_NAMESPACE::demod::PPARAMS |
|
protected |
|
protected |
|
protected |
RTL2832_NAMESPACE::demod::demod | ( | ) |
|
virtual |
|
inline |
Referenced by baz_rtl_source_c::auto_gain_mode(), baz_rtl_source_c::bandwidth(), baz_rtl_source_c::bandwidth_range(), baz_rtl_source_c::bandwidth_values(), baz_rtl_source_c::calc_appropriate_gain_mode(), baz_rtl_source_c::frequency(), baz_rtl_source_c::frequency_range(), baz_rtl_source_c::gain(), baz_rtl_source_c::gain_mode(), baz_rtl_source_c::gain_modes(), baz_rtl_source_c::gain_range(), and baz_rtl_source_c::gain_values().
int RTL2832_NAMESPACE::demod::check_libusb_result | ( | int | res, |
bool | zero_okay, | ||
const char * | function_name = NULL , |
||
int | line_number = -1 , |
||
const char * | line = NULL |
||
) |
|
inline |
|
protected |
|
protected |
void RTL2832_NAMESPACE::demod::destroy | ( | ) |
|
protected |
|
virtual |
Implements RTL2832_NAMESPACE::i2c_interface.
|
virtual |
Implements RTL2832_NAMESPACE::i2c_interface.
|
virtual |
Implements RTL2832_NAMESPACE::i2c_interface.
|
virtual |
Implements RTL2832_NAMESPACE::i2c_interface.
|
protected |
int RTL2832_NAMESPACE::demod::initialise | ( | PPARAMS | params = NULL | ) |
void RTL2832_NAMESPACE::demod::log | ( | const char * | message, |
... | |||
) |
|
virtual |
Implements RTL2832_NAMESPACE::named_interface.
Referenced by baz_rtl_source_c::name().
|
protected |
|
protected |
int RTL2832_NAMESPACE::demod::read_samples | ( | unsigned char * | buffer, |
uint32_t | buffer_size, | ||
int * | bytes_read, | ||
int | timeout = -1 |
||
) |
int RTL2832_NAMESPACE::demod::reset | ( | ) |
|
inline |
Referenced by baz_rtl_source_c::sample_rate().
|
inline |
Referenced by baz_rtl_source_c::sample_rate_range().
int RTL2832_NAMESPACE::demod::set_gpio_bit | ( | uint8_t | gpio, |
int | val | ||
) |
int RTL2832_NAMESPACE::demod::set_gpio_output | ( | uint8_t | gpio | ) |
|
virtual |
Implements RTL2832_NAMESPACE::i2c_interface.
int RTL2832_NAMESPACE::demod::set_if | ( | double | frequency | ) |
int RTL2832_NAMESPACE::demod::set_sample_rate | ( | uint32_t | samp_rate, |
double * | real_rate = NULL |
||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |