diff options
Diffstat (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_client.h')
-rw-r--r-- | host/lib/usrp/common/ad9361_driver/ad9361_client.h | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_client.h b/host/lib/usrp/common/ad9361_driver/ad9361_client.h index 300fdb2a5..fa501b615 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_client.h +++ b/host/lib/usrp/common/ad9361_driver/ad9361_client.h @@ -2,15 +2,13 @@ // Copyright 2014 Ettus Research LLC // -#ifndef INCLUDED_AD9361_CLIENT_SETTINGS_H -#define INCLUDED_AD9361_CLIENT_SETTINGS_H +#ifndef INCLUDED_AD9361_CLIENT_H +#define INCLUDED_AD9361_CLIENT_H #include <stdint.h> -#include <ad9361_device.h> +#include <boost/shared_ptr.hpp> -#ifdef __cplusplus -extern "C" { -#endif +namespace uhd { namespace usrp { /*! * Frequency band settings @@ -21,8 +19,6 @@ typedef enum { AD9361_TX_BAND0 } frequency_band_t; -double ad9361_client_get_band_edge(ad9361_product_t product, frequency_band_t band); - /*! * Clocking mode */ @@ -31,8 +27,6 @@ typedef enum { AD9361_XTAL_N_CLK_PATH } clocking_mode_t; -clocking_mode_t ad9361_client_get_clocking_mode(ad9361_product_t product); - /*! * Digital interface specific */ @@ -41,8 +35,9 @@ typedef enum { AD9361_DDR_FDD_LVDS } digital_interface_mode_t; -digital_interface_mode_t ad9361_client_get_digital_interface_mode(ad9361_product_t product); - +/*! + * Interface timing + */ typedef struct { uint8_t rx_clk_delay; uint8_t rx_data_delay; @@ -50,10 +45,30 @@ typedef struct { uint8_t tx_data_delay; } digital_interface_delays_t; -digital_interface_delays_t ad9361_client_get_digital_interface_timing(ad9361_product_t product); +class ad9361_params { +public: + typedef boost::shared_ptr<ad9361_params> sptr; + + virtual ~ad9361_params() {} + + virtual digital_interface_delays_t get_digital_interface_timing() = 0; + virtual digital_interface_mode_t get_digital_interface_mode() = 0; + virtual clocking_mode_t get_clocking_mode() = 0; + virtual double get_band_edge(frequency_band_t band) = 0; +}; + +class ad9361_io +{ +public: + typedef boost::shared_ptr<ad9361_io> sptr; + + virtual ~ad9361_io() {} + + virtual uint8_t peek8(uint32_t reg) = 0; + virtual void poke8(uint32_t reg, uint8_t val) = 0; +}; + -#ifdef __cplusplus -} -#endif +}} -#endif /* INCLUDED_AD9361_CLIENT_SETTINGS_H */ +#endif /* INCLUDED_AD9361_CLIENT_H */ |