Skip to content

Commit 98c7b9f

Browse files
authored
Merge pull request #2494 from particle-iot/fix/esomx-pwm
[tests] [esomx] disable RGB pwm channel(s) when running pwm tests
2 parents 57b9643 + b2e1525 commit 98c7b9f

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

hal/src/boron/pinmap_hal.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const uint8_t NRF_PIN_LOOKUP_TABLE[48] = {
125125

126126
#if PLATFORM_ID == PLATFORM_ESOMX
127127

128-
// H/W v0.02
128+
// H/W v0.02 and H/W v0.03
129129
static Hal_Pin_Info s_pin_map[TOTAL_PINS] = {
130130
/* User space */
131131
/* D0 - 00 */ { NRF_PORT_1, 1, PIN_MODE_NONE, PF_NONE, ADC_CHANNEL_NONE, 1, 0, 8, EXTI_CHANNEL_NONE, 0},

user/tests/wiring/no_fixture/gpio.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,7 @@ test(GPIO_07_pulseIn_TimesOutAfter3Seconds) {
175175
}
176176

177177
test(GPIO_08_DigitalReadWorksMixedWithAnalogRead) {
178-
#if PLATFORM_ID == PLATFORM_ESOMX
179-
pin_t pin = A3;
180-
#else
181178
pin_t pin = A0;
182-
#endif
183179

184180
pinMode(pin, INPUT_PULLUP);
185181
assertEqual(hal_gpio_get_mode(pin), INPUT_PULLUP);

user/tests/wiring/no_fixture_long_running/pwm.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ static hal_pin_t pin = pwm_pins[0].pin;
4747

4848
template <typename F> void for_all_pwm_pins(F callback)
4949
{
50-
// RGB.control(true);
50+
RGB.control(true);
5151
for (uint8_t i = 0; i<arraySize(pwm_pins); i++)
5252
{
5353
callback(pwm_pins[i].pin, pwm_pins[i].name);
5454
// Make sure to disable PWM pins
5555
pinMode(pwm_pins[i].pin, INPUT);
5656
}
57-
// RGB.control(false);
57+
RGB.control(false);
5858
}
5959

6060
test(PWM_01_NoAnalogWriteWhenPinModeIsNotSetToOutput) {

0 commit comments

Comments
 (0)