Fix compile failure (PR->master branch mismatch issue) (#1200)
This commit is contained in:
parent
e08d5dab25
commit
170c3a8a31
|
@ -144,7 +144,7 @@ static inline uint32_t div100(uint32_t n) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(__arm__) && !defined(CORE_TEENSY)
|
||||
#if defined(__arm__)
|
||||
static inline int div100(int n) {
|
||||
return DIV_ROUND_CLOSEST(n, 100U, int);
|
||||
}
|
||||
|
|
|
@ -246,6 +246,7 @@ void test_initialisation_outputs_reset_control_use_board_default(void)
|
|||
|
||||
void test_initialisation_outputs_reset_control_override_board_default(void)
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
prepareForInitialiseAll(9);
|
||||
configPage4.resetControlConfig = RESET_CONTROL_PREVENT_WHEN_RUNNING;
|
||||
configPage4.resetControlPin = 45; // Use a different pin
|
||||
|
@ -254,10 +255,12 @@ void test_initialisation_outputs_reset_control_override_board_default(void)
|
|||
TEST_ASSERT_EQUAL(45, pinResetControl);
|
||||
TEST_ASSERT_EQUAL(resetControl, RESET_CONTROL_PREVENT_WHEN_RUNNING);
|
||||
TEST_ASSERT_EQUAL(OUTPUT, getPinMode(pinResetControl));
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_initialisation_user_pin_override_board_default(void)
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
prepareForInitialiseAll(3);
|
||||
// We do not test all pins, too many & too fragile. So fingers crossed the
|
||||
// same pattern is used for all.
|
||||
|
@ -266,6 +269,7 @@ void test_initialisation_user_pin_override_board_default(void)
|
|||
|
||||
TEST_ASSERT_EQUAL(15, pinTachOut);
|
||||
TEST_ASSERT_EQUAL(OUTPUT, getPinMode(pinTachOut));
|
||||
#endif
|
||||
}
|
||||
|
||||
// All config user pin fields are <= 6 *bits*. So too small to
|
||||
|
@ -286,6 +290,7 @@ void test_initialisation_user_pin_not_valid_no_override(void)
|
|||
|
||||
void test_initialisation_input_user_pin_does_not_override_outputpin(void)
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
// A user defineable input pin should not overwrite any output pins.
|
||||
prepareForInitialiseAll(3);
|
||||
configPage6.launchPin = 49; // 49 is the default tacho output
|
||||
|
@ -294,6 +299,7 @@ void test_initialisation_input_user_pin_does_not_override_outputpin(void)
|
|||
TEST_ASSERT_EQUAL(49, pinTachOut);
|
||||
TEST_ASSERT_EQUAL(OUTPUT, getPinMode(pinTachOut));
|
||||
TEST_ASSERT_EQUAL(49, pinLaunch);
|
||||
#endif
|
||||
}
|
||||
|
||||
void testInitialisation()
|
||||
|
|
|
@ -63,7 +63,7 @@ void test_maths_div100_S16(void)
|
|||
void test_maths_div100_S32(void)
|
||||
{
|
||||
//Check both the signed and unsigned results
|
||||
#if defined(__arm__) && !defined(CORE_TEENSY)
|
||||
#if defined(__arm__)
|
||||
test_div100_Seed<int>(100U);
|
||||
test_div100_Seed<int>(10000U);
|
||||
test_div100_Seed<int>(100000000UL);
|
||||
|
@ -151,9 +151,12 @@ void test_maths_udiv_32_16_closest(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
static uint32_t indexToDividend(int16_t index) {
|
||||
return (uint32_t)index + (UINT16_MAX*index);
|
||||
}
|
||||
#endif
|
||||
|
||||
void test_maths_udiv_32_16_perf(void)
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
|
|
Loading…
Reference in New Issue