From 2333a30341cbb337f8d5dc49d48b8d2dd2b886c7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 16 Feb 2017 14:39:38 -0800 Subject: uhd: Replace clocking_mode_t unscoped enum with scoped version This is not a functional change, but it marks the usage of scoped enums in UHD. Commits past this one may also use this C++11 feature. --- host/lib/usrp/common/ad9361_driver/ad9361_client.h | 4 ++-- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/common') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_client.h b/host/lib/usrp/common/ad9361_driver/ad9361_client.h index 921045fbd..4fea53521 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_client.h +++ b/host/lib/usrp/common/ad9361_driver/ad9361_client.h @@ -34,10 +34,10 @@ typedef enum { /*! * Clocking mode */ -typedef enum { +enum class clocking_mode_t { AD9361_XTAL_P_CLK_PATH, AD9361_XTAL_N_CLK_PATH -} clocking_mode_t; +}; /*! * Digital interface specific diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index e2ed2c77d..110756eb5 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -1583,11 +1583,11 @@ void ad9361_device_t::initialize() /* Enable clocks. */ switch (_client_params->get_clocking_mode()) { - case AD9361_XTAL_N_CLK_PATH: { + case clocking_mode_t::AD9361_XTAL_N_CLK_PATH: { _io_iface->poke8(0x009, 0x17); } break; - case AD9361_XTAL_P_CLK_PATH: { + case clocking_mode_t::AD9361_XTAL_P_CLK_PATH: { _io_iface->poke8(0x009, 0x07); _io_iface->poke8(0x292, 0x08); _io_iface->poke8(0x293, 0x80); -- cgit v1.2.3