Skip to content

Commit 0d9a54f

Browse files
committed
Provide pinmap_uart_restricted_peripherals() function under DEVICE_SERIAL
1 parent 3c0982d commit 0d9a54f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/test_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ void find_ports(std::list<PortType> &matched_ports, std::list<PortType> &not_mat
136136
}
137137
}
138138

139+
#if DEVICE_SERIAL
139140
if (!strcmp(PortType::PinMap::name, UART_NAME) || !strcmp(PortType::PinMap::name, UARTNOFC_NAME)) {
140141
if (pinmap_list_has_peripheral(pinmap_uart_restricted_peripherals(), port.peripheral)) {
141142
utest_printf("Skipping %s peripheral %i with pin %s (%i)\r\n", pin_type,
142143
port.peripheral, FormFactorType::pin_to_string(port.pins[i]), port.pins[i]);
143144
continue;
144145
}
145146
}
147+
#endif
146148

147149
// skipp pin searching if single pin port type
148150
if (PortType::pin_count > 1) {

hal/mbed_pinmap_default.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ MBED_WEAK const PinList *pinmap_gpio_restricted_pins()
9090
}
9191

9292
//*** Default restricted peripherals ***
93+
#if DEVICE_SERIAL
9394
MBED_WEAK const PeripheralList *pinmap_uart_restricted_peripherals()
9495
{
9596
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()
104105
};
105106
return &peripheral_list;
106107
}
108+
#endif

hal/pinmap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ const PinList *pinmap_restricted_pins(void);
174174
*
175175
* @return Pointer to a peripheral list of peripheral to avoid
176176
*/
177+
#if DEVICE_SERIAL
177178
const PeripheralList *pinmap_uart_restricted_peripherals(void);
179+
#endif
178180

179181
/**
180182
* Get the pin list of pins to avoid during GPIO/GPIO_IRQ testing

0 commit comments

Comments
 (0)