Skip to content

Commit 618c4b9

Browse files
committed
Fix broken tone and servo tests for p2 platform
1 parent 6fb1d02 commit 618c4b9

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

user/tests/wiring/no_fixture_long_running/servo.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "unit-test/unit-test.h"
2929

3030
#if HAL_PLATFORM_GEN == 3
31-
#if PLATFORM_ID == PLATFORM_ESOMX
32-
static const pin_t pin = D0, pin2 = D1;
31+
#if PLATFORM_ID == PLATFORM_P2 || PLATFORM_ID == PLATFORM_ESOMX
32+
static const hal_pin_t pin = D1, pin2 = D8;
3333
#else
34-
static const pin_t pin = A0, pin2 = A1;
34+
static const hal_pin_t pin = A0, pin2 = A1;
3535
#endif
3636
#else
3737
#error "Unsupported platform"
@@ -40,9 +40,9 @@ static const pin_t pin = A0, pin2 = A1;
4040
test(SERVO_01_CannotAttachWhenPinSelectedIsNotTimerChannel) {
4141
#if HAL_PLATFORM_NRF52840
4242
# if PLATFORM_ID == PLATFORM_TRACKER
43-
pin_t pin = BTN;
43+
hal_pin_t pin = BTN;
4444
#elif PLATFORM_ID == PLATFORM_ESOMX
45-
pin_t pin = A0;
45+
hal_pin_t pin = A0;
4646
# else
4747
hal_pin_t pin = D0;
4848
# endif

user/tests/wiring/no_fixture_long_running/tone.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#include "tone_hal.h"
2828
#include "unit-test/unit-test.h"
2929

30-
#if PLATFORM_ID == PLATFORM_ESOMX
31-
static const pin_t pin = D1;//pin under test
30+
#if PLATFORM_ID == PLATFORM_P2
31+
static const hal_pin_t pin = D1;//pin under test
3232
#else
33-
static const pin_t pin = A1;//pin under test
33+
static const hal_pin_t pin = A1;//pin under test
3434
#endif
3535

3636
test(TONE_01_NoGenerateWhenPinSelectedIsNotTimerChannel) {
3737
#if HAL_PLATFORM_NRF52840
3838
# if PLATFORM_ID == PLATFORM_TRACKER
39-
pin_t pin = BTN;
39+
hal_pin_t pin = BTN;
4040
# elif PLATFORM_ID == PLATFORM_ESOMX
41-
pin_t pin = A0;
41+
hal_pin_t pin = A0;
4242
# else
4343
hal_pin_t pin = D0;
4444
# endif

0 commit comments

Comments
 (0)