Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] [esomx] disable RGB pwm channel(s) when running pwm tests #2494

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hal/src/boron/pinmap_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const uint8_t NRF_PIN_LOOKUP_TABLE[48] = {

#if PLATFORM_ID == PLATFORM_ESOMX

// H/W v0.02
// H/W v0.02 and H/W v0.03
static Hal_Pin_Info s_pin_map[TOTAL_PINS] = {
/* User space */
/* D0 - 00 */ { NRF_PORT_1, 1, PIN_MODE_NONE, PF_NONE, ADC_CHANNEL_NONE, 1, 0, 8, EXTI_CHANNEL_NONE, 0},
Expand Down
4 changes: 0 additions & 4 deletions user/tests/wiring/no_fixture/gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,7 @@ test(GPIO_07_pulseIn_TimesOutAfter3Seconds) {
}

test(GPIO_08_DigitalReadWorksMixedWithAnalogRead) {
#if PLATFORM_ID == PLATFORM_ESOMX
pin_t pin = A3;
#else
pin_t pin = A0;
#endif

pinMode(pin, INPUT_PULLUP);
assertEqual(hal_gpio_get_mode(pin), INPUT_PULLUP);
Expand Down
4 changes: 2 additions & 2 deletions user/tests/wiring/no_fixture_long_running/pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ static hal_pin_t pin = pwm_pins[0].pin;

template <typename F> void for_all_pwm_pins(F callback)
{
// RGB.control(true);
RGB.control(true);
for (uint8_t i = 0; i<arraySize(pwm_pins); i++)
{
callback(pwm_pins[i].pin, pwm_pins[i].name);
// Make sure to disable PWM pins
pinMode(pwm_pins[i].pin, INPUT);
}
// RGB.control(false);
RGB.control(false);
}

test(PWM_01_NoAnalogWriteWhenPinModeIsNotSetToOutput) {
Expand Down