diff --git a/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/test_utils.h b/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/test_utils.h index 10086aa01c..f5f554eb15 100644 --- a/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/test_utils.h +++ b/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/test_utils.h @@ -136,6 +136,7 @@ void find_ports(std::list &matched_ports, std::list ¬_mat } } +#if DEVICE_SERIAL if (!strcmp(PortType::PinMap::name, UART_NAME) || !strcmp(PortType::PinMap::name, UARTNOFC_NAME)) { if (pinmap_list_has_peripheral(pinmap_uart_restricted_peripherals(), port.peripheral)) { utest_printf("Skipping %s peripheral %i with pin %s (%i)\r\n", pin_type, @@ -143,6 +144,7 @@ void find_ports(std::list &matched_ports, std::list ¬_mat continue; } } +#endif // skipp pin searching if single pin port type if (PortType::pin_count > 1) { diff --git a/hal/mbed_pinmap_default.cpp b/hal/mbed_pinmap_default.cpp index a1ea453a9d..45ac316691 100644 --- a/hal/mbed_pinmap_default.cpp +++ b/hal/mbed_pinmap_default.cpp @@ -90,6 +90,7 @@ MBED_WEAK const PinList *pinmap_gpio_restricted_pins() } //*** Default restricted peripherals *** +#if DEVICE_SERIAL MBED_WEAK const PeripheralList *pinmap_uart_restricted_peripherals() { static const int stdio_uart = pinmap_peripheral(STDIO_UART_TX, serial_tx_pinmap()); @@ -104,3 +105,4 @@ MBED_WEAK const PeripheralList *pinmap_uart_restricted_peripherals() }; return &peripheral_list; } +#endif diff --git a/hal/pinmap.h b/hal/pinmap.h index abc3654585..f3af23b9d6 100644 --- a/hal/pinmap.h +++ b/hal/pinmap.h @@ -174,7 +174,9 @@ const PinList *pinmap_restricted_pins(void); * * @return Pointer to a peripheral list of peripheral to avoid */ +#if DEVICE_SERIAL const PeripheralList *pinmap_uart_restricted_peripherals(void); +#endif /** * Get the pin list of pins to avoid during GPIO/GPIO_IRQ testing