Make better use of range_t methods.

This commit is contained in:
Jared Boone
2016-01-27 14:46:45 -08:00
parent ca3b1a2c5a
commit 7519b83379
8 changed files with 39 additions and 72 deletions
+2 -8
View File
@@ -51,10 +51,7 @@ constexpr auto reference_frequency = rffc5072_reference_f;
namespace vco {
constexpr rf::FrequencyRange range {
.min = 2700000000U,
.max = 5400000000U,
};
constexpr rf::FrequencyRange range { 2700000000, 5400000000 };
} /* namespace vco */
@@ -66,10 +63,7 @@ constexpr size_t divider_log2_max = 5;
constexpr size_t divider_min = 1U << divider_log2_min;
constexpr size_t divider_max = 1U << divider_log2_max;
constexpr rf::FrequencyRange range {
.min = vco::range.min / divider_max,
.max = vco::range.max / divider_min,
};
constexpr rf::FrequencyRange range { vco::range.minimum / divider_max, vco::range.maximum / divider_min };
size_t divider_log2(const rf::Frequency lo_frequency) {
/* TODO: Error */