Skip to content

Commit 440700a

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

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-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

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@
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
32+
#elif PLATFORM_ID == PLATFORM_ESOMX
33+
static const hal_pin_t pin = A3;//pin under test
3234
#else
33-
static const pin_t pin = A1;//pin under test
35+
static const hal_pin_t pin = A1;//pin under test
3436
#endif
3537

3638
test(TONE_01_NoGenerateWhenPinSelectedIsNotTimerChannel) {
3739
#if HAL_PLATFORM_NRF52840
3840
# if PLATFORM_ID == PLATFORM_TRACKER
39-
pin_t pin = BTN;
41+
hal_pin_t pin = BTN;
4042
# elif PLATFORM_ID == PLATFORM_ESOMX
41-
pin_t pin = A0;
43+
hal_pin_t pin = A0;
4244
# else
4345
hal_pin_t pin = D0;
4446
# endif

0 commit comments

Comments
 (0)