diff options
| author | Mark Meserve <mark.meserve@ni.com> | 2017-09-07 14:49:08 -0500 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:01 -0800 | 
| commit | df9de8894b7cd2f599b7860cad583026001352a6 (patch) | |
| tree | cf674fdba8730ce3a5c0b69e587c087a457b899f /mpm/lib | |
| parent | b8aca7b4c8d27f2e6655d5865e5c6252b36ddad2 (diff) | |
| download | uhd-df9de8894b7cd2f599b7860cad583026001352a6.tar.gz uhd-df9de8894b7cd2f599b7860cad583026001352a6.tar.bz2 uhd-df9de8894b7cd2f599b7860cad583026001352a6.zip  | |
adi: update arm_version function signature
Diffstat (limited to 'mpm/lib')
| -rw-r--r-- | mpm/lib/mykonos/ad937x_ctrl.cpp | 15 | ||||
| -rw-r--r-- | mpm/lib/mykonos/ad937x_device.cpp | 20 | ||||
| -rw-r--r-- | mpm/lib/mykonos/ad937x_device_types.hpp | 2 | 
3 files changed, 36 insertions, 1 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp index d859195bc..a3119cb89 100644 --- a/mpm/lib/mykonos/ad937x_ctrl.cpp +++ b/mpm/lib/mykonos/ad937x_ctrl.cpp @@ -219,6 +219,7 @@ public:              << api.major_ver << "."              << api.minor_ver << "."              << api.build_ver; +          return ss.str();      } @@ -230,6 +231,20 @@ public:          ss  << arm.major_ver << "."              << arm.minor_ver << "."              << arm.rc_ver; + +        switch (arm.build_type) +        { +        case mpm::ad937x::device::build_type_t::RELEASE: +            ss << " Release"; +            break; +        case mpm::ad937x::device::build_type_t::DEBUG: +            ss << " Debug"; +            break; +        case mpm::ad937x::device::build_type_t::TEST_OBJECT: +            ss << " Test Object"; +            break; +        } +          return ss.str();      } diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index 511a0a0a1..7b6908d5f 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -471,11 +471,29 @@ api_version_t ad937x_device::get_api_version()  arm_version_t ad937x_device::get_arm_version()  {      arm_version_t arm; +    mykonosBuild_t build;      _call_api_function(std::bind(MYKONOS_getArmVersion,          mykonos_config.device,          &arm.major_ver,          &arm.minor_ver, -        &arm.rc_ver)); +        &arm.rc_ver, +        &build)); + +    switch (build) +    { +    case MYK_BUILD_RELEASE: +        arm.build_type = mpm::ad937x::device::build_type_t::RELEASE; +        break; +    case MYK_BUILD_DEBUG: +        arm.build_type = mpm::ad937x::device::build_type_t::DEBUG; +        break; +    case MYK_BUILD_TEST_OBJECT: +        arm.build_type = mpm::ad937x::device::build_type_t::TEST_OBJECT; +        break; +    default: +        MPM_THROW_INVALID_CODE_PATH(); +    } +      return arm;  } diff --git a/mpm/lib/mykonos/ad937x_device_types.hpp b/mpm/lib/mykonos/ad937x_device_types.hpp index cdc46fb5c..de24f9499 100644 --- a/mpm/lib/mykonos/ad937x_device_types.hpp +++ b/mpm/lib/mykonos/ad937x_device_types.hpp @@ -25,6 +25,7 @@  namespace mpm {      namespace ad937x {          namespace device { +            enum class build_type_t { RELEASE, DEBUG, TEST_OBJECT };              struct api_version_t {                  uint32_t silicon_ver; @@ -37,6 +38,7 @@ namespace mpm {                  uint8_t major_ver;                  uint8_t minor_ver;                  uint8_t rc_ver; +                build_type_t build_type;              };              enum class chain_t { ONE, TWO };  | 
