test_speed_table: improve static assertion
Test against the resulting timer speed, not against the CPU clockpull/47/head
parent
d87db1ff76
commit
16cf02726b
|
|
@ -5,8 +5,9 @@
|
|||
using Catch::Matchers::Equals;
|
||||
using namespace modules::speed_table;
|
||||
|
||||
// The following reference values are calculated for 16MHz F_CPU
|
||||
static_assert(F_CPU == 16000000);
|
||||
// The following reference values are calculated for 2MHz timer
|
||||
static_assert(F_CPU / cpuFrequencyDivider == 2000000,
|
||||
"speed tables not compatible for the requested frequency");
|
||||
|
||||
static const st_timer_t reference[][3] = {
|
||||
{ 1, 62500, 1 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue