mirror of https://github.com/ARMmbed/mbed-os.git
Provide pinmap_uart_restricted_peripherals() function under DEVICE_SERIAL
parent
3c0982d939
commit
0d9a54f92e
|
|
@ -136,6 +136,7 @@ void find_ports(std::list<PortType> &matched_ports, std::list<PortType> ¬_mat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEVICE_SERIAL
|
||||||
if (!strcmp(PortType::PinMap::name, UART_NAME) || !strcmp(PortType::PinMap::name, UARTNOFC_NAME)) {
|
if (!strcmp(PortType::PinMap::name, UART_NAME) || !strcmp(PortType::PinMap::name, UARTNOFC_NAME)) {
|
||||||
if (pinmap_list_has_peripheral(pinmap_uart_restricted_peripherals(), port.peripheral)) {
|
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,
|
utest_printf("Skipping %s peripheral %i with pin %s (%i)\r\n", pin_type,
|
||||||
|
|
@ -143,6 +144,7 @@ void find_ports(std::list<PortType> &matched_ports, std::list<PortType> ¬_mat
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// skipp pin searching if single pin port type
|
// skipp pin searching if single pin port type
|
||||||
if (PortType::pin_count > 1) {
|
if (PortType::pin_count > 1) {
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ MBED_WEAK const PinList *pinmap_gpio_restricted_pins()
|
||||||
}
|
}
|
||||||
|
|
||||||
//*** Default restricted peripherals ***
|
//*** Default restricted peripherals ***
|
||||||
|
#if DEVICE_SERIAL
|
||||||
MBED_WEAK const PeripheralList *pinmap_uart_restricted_peripherals()
|
MBED_WEAK const PeripheralList *pinmap_uart_restricted_peripherals()
|
||||||
{
|
{
|
||||||
static const int stdio_uart = pinmap_peripheral(STDIO_UART_TX, serial_tx_pinmap());
|
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;
|
return &peripheral_list;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,9 @@ const PinList *pinmap_restricted_pins(void);
|
||||||
*
|
*
|
||||||
* @return Pointer to a peripheral list of peripheral to avoid
|
* @return Pointer to a peripheral list of peripheral to avoid
|
||||||
*/
|
*/
|
||||||
|
#if DEVICE_SERIAL
|
||||||
const PeripheralList *pinmap_uart_restricted_peripherals(void);
|
const PeripheralList *pinmap_uart_restricted_peripherals(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the pin list of pins to avoid during GPIO/GPIO_IRQ testing
|
* Get the pin list of pins to avoid during GPIO/GPIO_IRQ testing
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue